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

Jonathan T. Niehof jniehof at lanl.gov
Thu May 24 10:56:33 EDT 2012

On 05/23/2012 05:31 PM, T J wrote:

> It seems that there are a number of ways to check if an array is a view.
> Do we have a preferred way in the API that is guaranteed to stay
> available? Or are all of the various methods "here to stay"?

We've settled on checking array.base, which I think was the outcome of a 
stackoverflow thread that I can't dig up. (I'll check with the guy who 
wrote the code.)

Jonathan Niehof
ISR-3 Space Data Systems
Los Alamos National Laboratory
Los Alamos, NM 87545

Phone: 505-667-9595
email: jniehof at lanl.gov

Correspondence /
Technical data or Software Publicly Available

More information about the NumPy-Discussion mailing list