On 21/06/21 6:04 am, Sebastian Berg wrote:
* `flatten()` (alwasy copy)
* `ravel()` (copies if needed, and additionally ensures contiguity)
* `reshape(-1)` (copies if needed)
They are all subtly different, unfortunately.
There's also a .flat attribute, that returns a 1-d iterator!
--
Greg
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/K6MEDWIRNXK6ES5RKM22SESPZFNBHFWZ/
Code of Conduct: http://python.org/psf/codeofconduct/