NumPy provides efficient numerical computing in Python, handling large arrays and mathematical operations.
Vectorized operations
Multi-dimensional data
Built-in mathematical operations
Generate random numbers
Grid of values
Example: arr = np.array([1,2,3])...
Dimensions of array
Example: (3,4) for 3x4 matrix...
Operations on different shapes
Example: arr + 5...
Operations on entire arrays
Example: arr * 2...
import numpy as np
arr = np.array([1,2,3])
arr.mean(), arr.std()
arr.reshape(3,1)
arr[0], arr[1:3]
np.sum(arr), np.max(arr)