[Numpy-discussion] detecting shared data

Matthew Koichi Grimes mkg@cs.nyu....
Wed Apr 11 17:12:16 CDT 2007


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)
True

-- Matt


More information about the Numpy-discussion mailing list