<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
This is the stack overflow discussion mentioned.
<div><br>
</div>
<div><a href="http://stackoverflow.com/questions/9164269/can-you-tell-if-an-array-is-a-view-of-another">http://stackoverflow.com/questions/9164269/can-you-tell-if-an-array-is-a-view-of-another</a></div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Brian</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div>
<div>On May 24, 2012, at 8:56 AM, Jonathan T. Niehof wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>On 05/23/2012 05:31 PM, T J wrote:<br>
<br>
<blockquote type="cite">It seems that there are a number of ways to check if an array is a view.<br>
</blockquote>
<blockquote type="cite">Do we have a preferred way in the API that is guaranteed to stay<br>
</blockquote>
<blockquote type="cite">available? Or are all of the various methods "here to stay"?<br>
</blockquote>
<br>
We've settled on checking array.base, which I think was the outcome of a <br>
stackoverflow thread that I can't dig up. (I'll check with the guy who <br>
wrote the code.)<br>
<br>
-- <br>
Jonathan Niehof<br>
ISR-3 Space Data Systems<br>
Los Alamos National Laboratory<br>
MS-D466<br>
Los Alamos, NM 87545<br>
<br>
Phone: 505-667-9595<br>
email: <a href="mailto:jniehof@lanl.gov">jniehof@lanl.gov</a><br>
<br>
Correspondence /<br>
Technical data or Software Publicly Available<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div>
</blockquote>
</div>
<br>
<div>
<div><br class="Apple-interchange-newline">
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>-- <br>
<br>
Brian A. Larsen<br>
ISR-1 Space Science and Applications<br>
Los Alamos National Laboratory</div>
<div>PO Box 1663, MS-D466<br>
Los Alamos, NM 87545<br>
USA<br>
<br>
(For overnight add:<br>
SM-30, Bikini Atoll Road)<br>
<br>
Phone: 505-665-7691<br>
Fax:   505-665-7395<br>
email: <a href="mailto:balarsen@lanl.gov">balarsen@lanl.gov</a><br>
<br>
Correspondence /<br>
Technical data or Software Publicly Available<br>
</div>
<div><br>
</div>
<br class="Apple-interchange-newline">
</div>
<br>
</div>
</body>
</html>