It's better than nothing. I basically want some sanity-check assert code that can assert that some arrays are in fact sub-arrays of another array. Your OWNDATA suggestion meets me halfway by allowing me to check that these sub-arrays are at least sub-arrays of *someone*.
Thanks, -- Matt Pierre GM wrote: > On Wednesday 11 April 2007 18:12:16 Matthew Koichi Grimes wrote: > >> Is there any way to detect whether one array is a view into another >> >> array? I'd like something like: >> >>> arr = N.arange(5) >> >>> subarr = arr[1:3] >> >>> sharesdata(arr, subarr) >> > > Mmh, would arr.flags['OWNDATA'] would do the trick ? > p. > _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion