Learn the fundamental package for scientific computing with Python. High-performance multi-dimensional arrays, mathematical functions, and more.
Get Started DocumentationNumPy arrays are stored at one continuous place in memory unlike lists, so processes can access and manipulate them very efficiently. This behavior is called locality of reference.
Read MoreIt contains a large collection of high-level mathematical functions to operate on these arrays, making it easy to perform complex linear algebra, Fourier transforms, and random number capabilities.
Read MoreNumPy is the core library for scientific computing in Python. It provides a high-performance multidimensional array object, and tools for working with these arrays.
Read MoreCreating arrays and performing mathematical operations is straightforward. Here is a quick example of creating an array and multiplying its values.
import numpy as np
# Create a 1D array
arr = np.array([1, 2, 3, 4, 5])
# Multiply array by 10
result = arr * 10
print(result)
# Output: [10 20 30 40 50]