[Numpy-discussion] New may_share_memory function

Travis Oliphant oliphant@ee.byu....
Thu Feb 1 19:00:25 CST 2007


In SVN there is a new function  may_share_memory(a,b) which will return 
True if the memory foot-print of the two arrays over-lap.

 >>> may_share_memory(a, flipud(a))
True

This is based on another utility function byte_bounds that returns the 
byte-boundaries of any object exporting the Python side of the array 
interface.

Perhaps these utilities will help (I know they can be used to make the 
who function a bit more intelligent about how many bytes are being used).

-Travis





More information about the Numpy-discussion mailing list