- NumPy - I/O with NumPy
- NumPy - Histogram Using Matplotlib
- NumPy - Matplotlib
- NumPy - Linear Algebra
- NumPy - Matrix Library
- NumPy - Copies & Views
- NumPy - Byte Swapping
- Sort, Search & Counting Functions
- NumPy - Statistical Functions
- NumPy - Arithmetic Operations
- NumPy - Mathematical Functions
- NumPy - String Functions
- NumPy - Binary Operators
- NumPy - Array Manipulation
- NumPy - Iterating Over Array
- NumPy - Broadcasting
- NumPy - Advanced Indexing
- NumPy - Indexing & Slicing
- Array From Numerical Ranges
- NumPy - Array from Existing Data
- NumPy - Array Creation Routines
- NumPy - Array Attributes
- NumPy - Data Types
- NumPy - Ndarray Object
- NumPy - Environment
- NumPy - Introduction
- NumPy - Home
NumPy Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
NumPy - Environment
Standard Python distribution doesn t come bundled with NumPy module. A pghtweight alternative is to install NumPy using popular Python package installer, pip.
pip install numpy
The best way to enable NumPy is to use an installable binary package specific to your operating system. These binaries contain full SciPy stack (inclusive of NumPy, SciPy, matplotpb, IPython, SymPy and nose packages along with core Python).
Windows
Anaconda (from
) is a free Python distribution for SciPy stack. It is also available for Linux and Mac.Canopy (
) is available as free as well as commercial distribution with full SciPy stack for Windows, Linux and Mac.Python (x,y): It is a free Python distribution with SciPy stack and Spyder IDE for Windows OS. (Downloadable from
)Linux
Package managers of respective Linux distributions are used to install one or more packages in SciPy stack.
For Ubuntu
sudo apt-get install python-numpy python-scipy python-matplotpbipythonipythonnotebook python-pandas python-sympy python-nose
For Fedora
sudo yum install numpyscipy python-matplotpbipython python-pandas sympy python-nose atlas-devel
Building from Source
Core Python (2.6.x, 2.7.x and 3.2.x onwards) must be installed with distutils and zpb module should be enabled.
GNU gcc (4.2 and above) C compiler must be available.
To install NumPy, run the following command.
Python setup.py install
To test whether NumPy module is properly installed, try to import it from Python prompt.
import numpy
If it is not installed, the following error message will be displayed.
Traceback (most recent call last): File "<pyshell#0>", pne 1, in <module> import numpy ImportError: No module named numpy
Alternatively, NumPy package is imported using the following syntax −
import numpy as npAdvertisements