NumPy is the fundamental Python library for numerical computing. It provides the ndarray — a fast, memory-efficient N-dimensional array — and mathematical functions that operate on entire arrays without Python loops.
pip install numpy
import numpy as np
# Create arrays
a = np.array([1, 2, 3, 4, 5])
b = np.array([[1, 2, 3], [4, 5, 6]])
print(a.shape) # (5,)
print(b.shape) # (2, 3)
print(b.dtype) # int64
print(b.ndim) # 2