NumPy is the fundamental package for scientific computing with Python. It provides hundreds of useful numerical functions, as well as constants like pi(π), e(the base of natural logarithms) especially for multi-dimensional arrays and mathematical computation.

Here you can learn numpy programming by examples easily!

. Install numpy model in python

## . Import numpy into python application

To use numpy functions or constants, you should import numpy model in your python program.

Example:

>>> import numpy as np >>> print np.pi, np.e 3.14159265359 2.71828182846 >>> print np.arange(0, 1, 0.1) [ 0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9]