Memory usage optimization
Broadcasting
NumPy operations can be optimized using broadcasting, which allows operations between arrays of different sizes but compatible shapes.
Example (2/3):
import numpy as np
a = np.array([[0, 0, 0],[10, 10, 10],[20, 20, 20],[30, 30, 30]])
b = np.array([1, 2, 3])
a + b
