[Numpy-discussion] Why ndarray provides four ways to flatten?
ndarray at mac.com
Wed Oct 29 13:09:39 EDT 2014
On Tue, Oct 28, 2014 at 10:11 PM, Nathaniel Smith <njs at pobox.com> wrote:
> .diagonal has no magic, it just turns out that the diagonal of any strided
> array is also expressible as a strided array. (Specifically, new_strides =
This is genius! Once you mentioned this, it is obvious how the new
diagonal() works and one can only wonder why it took over 20 years to get
this feature in NumPy.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion