[Numpy-discussion] detecting shared data

Anne Archibald peridot.faceted at gmail.com
Wed Apr 11 23:06:13 EDT 2007


On 11/04/07, Bill Baxter <wbaxter at gmail.com> wrote:

> Must be pretty recent.  I'm using 1.0.2.dev3520 (enthought egg) and
> the function's not there.

It is.

I've never been quite happy with it, though; I realize it's not very
feasible to write one that efficiently checks all possible overlaps,
but the current one claims (e.g.) a.real and a.imag may share memory,
which irks me. I put in a quick fix. Also, may_share_memory did not
have any tests (for shame!), so I put some of those in too. I wasn't
sure how to express "expected failure", and they're not the most
thorough, but they should help.

Anne M. Archibald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: share-patch
Type: application/octet-stream
Size: 4065 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070411/a1e04583/attachment.obj>


More information about the NumPy-Discussion mailing list