NumPy - Creating Arrays
You want to create a large array quickly and fill it later. Which is the best way to do this using
Why is
np.empty()?import numpy as np arr = np.empty((1000, 1000)) # Next step: fill arr with values
Why is
np.empty() preferred here over np.zeros()?