Free Sample
+ Collection

Learning NumPy Array

Ivan Idris

Supercharge your scientific Python computations by understanding how to use the NumPy library effectively
RRP $16.99
RRP $26.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783983902
Paperback164 pages

About This Book

  • Improve the performance of calculations with clean and efficient NumPy code
  • Analyze large data sets using statistical functions and execute complex linear algebra and mathematical computations
  • Perform complex array operations in a simple manner

Who This Book Is For

This book is for programmers, scientists, or engineers, who have basic Python knowledge and would like to be able to do numerical computations with Python.

Table of Contents

Chapter 1: Getting Started with NumPy
Installing NumPy, Matplotlib, SciPy, and IPython on Windows
Installing NumPy, Matplotlib, SciPy, and IPython on Linux
Installing NumPy, Matplotlib, and SciPy on Mac OS X
Building from source
NumPy arrays
Online resources and help
Chapter 2: NumPy Basics
The NumPy array object
Creating a multidimensional array
Selecting array elements
NumPy numerical types
Creating a record data type
One-dimensional slicing and indexing
Manipulating array shapes
Creating views and copies
Fancy indexing
Indexing with a list of locations
Indexing arrays with Booleans
Stride tricks for Sudoku
Broadcasting arrays
Chapter 3: Basic Data Analysis with NumPy
Introducing the dataset
Determining the daily temperature range
Looking for evidence of global warming
Comparing solar radiation versus temperature
Analyzing wind direction
Analyzing wind speed
Analyzing precipitation and sunshine duration
Analyzing monthly precipitation in De Bilt
Analyzing atmospheric pressure in De Bilt
Analyzing atmospheric humidity in De Bilt
Chapter 4: Simple Predictive Analytics with NumPy
Examining autocorrelation of average temperature with pandas
Describing data with pandas DataFrames
Correlating weather and stocks with pandas
Predicting temperature
Analyzing intra-year daily average temperatures
Introducing the day-of-the-year temperature model
Modeling temperature with the SciPy leastsq function
Day-of-year temperature take two
Moving-average temperature model with lag 1
The Autoregressive Moving Average temperature model
The time-dependent temperature mean adjusted autoregressive model
Outliers analysis of average De Bilt temperature
Using more robust statistics
Chapter 5: Signal Processing Techniques
Introducing the Sunspot data
Moving averages
Smoothing functions
Forecasting with an ARMA model
Filtering a signal
Demonstrating cointegration
Chapter 6: Profiling, Debugging, and Testing
Assert functions
Profiling a program with IPython
Debugging with IPython
Performing Unit tests
Nose tests decorators
Chapter 7: The Scientific Python Ecosystem
Numerical integration
Using Cython with NumPy
Clustering stocks with scikit-learn
Detecting corners
Comparing NumPy to Blaze

What You Will Learn

  • Install NumPy and discover its arrays and features
  • Perform data analysis and complex array operations with NumPy
  • Analyze time series and perform signal processing
  • Understand NumPy modules and explore the scientific Python ecosystem
  • Improve the performance of calculations with clean and efficient NumPy code
  • Analyze large data sets using statistical functions and execute complex linear algebra and mathematical computations

In Detail

NumPy is an extension of Python, which provides highly optimized arrays and numerical operations. NumPy replaces a lot of the functionality of Matlab and Mathematica specifically vectorized operations, but in contrast to those products is free and open source. In today's world of science and technology, it is all about speed and flexibility.

This book will teach you about NumPy, a leading scientific computing library. This book enables you to write readable, efficient, and fast code, which is closely associated to the language of mathematics. Save thousands of dollars on expensive software, while keeping all the flexibility and power of your favorite programming language.

You will learn about installing and using NumPy and related concepts. At the end of the book we will explore related scientific computing projects. This book will give you a solid foundation in NumPy arrays and universal functions. Learning NumPy Array will help you be productive with NumPy and write clean and fast code.


Read More