This is the stack overflow discussion mentioned. http://stackoverflow.com/questions/9164269/can-you-tell-if-an-array-is-a-view-of-another
I basically implemented the answer from SO. I feel like the "is" gives you a good handle on things since to be true they are actually the same location in memory. Brian On May 24, 2012, at 8:56 AM, Jonathan T. Niehof wrote: 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 MS-D466 Los Alamos, NM 87545 Phone: 505-667-9595 email: jnie...@lanl.gov<mailto:jnie...@lanl.gov> Correspondence / Technical data or Software Publicly Available _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org<mailto:NumPy-Discussion@scipy.org> http://mail.scipy.org/mailman/listinfo/numpy-discussion -- Brian A. Larsen ISR-1 Space Science and Applications Los Alamos National Laboratory PO Box 1663, MS-D466 Los Alamos, NM 87545 USA (For overnight add: SM-30, Bikini Atoll Road) Phone: 505-665-7691 Fax: 505-665-7395 email: balar...@lanl.gov<mailto:balar...@lanl.gov> Correspondence / Technical data or Software Publicly Available
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion