1.2 KiB
Introduction
What is Numpy?
NumPy is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the fundamental package for scientific computing with Python. It is open-source software.
Features of NumPy
NumPy has various features including these important ones:
- A powerful N-dimensional array object
- Sophisticated (broadcasting) functions
- Tools for integrating C/C++ and Fortran code
- Useful linear algebra, Fourier transform, and random number capabilities
Install Numpy
Before installing Numpy, ensure you have Python installed on your system. You can download and install Python from the official Python website.
Numpy can be installed via the following pip command:
pip install numpy
How to import NumPy
To access NumPy and its functions import it in your Python code like this:
import numpy as np
We shorten the imported name to np for better readability of code using NumPy. This is a widely adopted convention that makes your code more readable for everyone working on it. We recommend to always use import numpy as np.