[Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

Robert Kern robert.kern at gmail.com
Fri May 25 09:17:13 EDT 2012

On Thu, May 24, 2012 at 5:52 PM, Robert Kern <robert.kern at gmail.com> wrote:

> (Hmm, now that I think about it, the edge cases are when the strides
> are 0 or negative. 0-stride axes can simply be removed, and I think we
> should be able to work back to a first item and flip the sign on the
> negative strides. The typical positive-stride solution can be found in
> an open source C++ global array code, IIRC. Double-hmmm...)

Except that it's still NP-complete.

Robert Kern

More information about the NumPy-Discussion mailing list