20 Jun
2021
20 Jun
'21
12:18 p.m.
On Sun, Jun 20, 2021, 2:07 PM Sebastian Berg
NumPy has:
* `flatten()` (always copy) * `ravel()` (copies if needed, and additionally ensures contiguity) * `reshape(-1)` (copies if needed)
They are all subtly different, unfortunately.
Oops! Sebastian is right, and I made an error. NumPy ndarray.flatten() is indeed a copy. ndarray.ravel() is usually a view.