[Numpy-discussion] detecting shared data

Stefan van der Walt stefan@sun.ac...
Thu Apr 12 02:55:44 CDT 2007

On Wed, Apr 11, 2007 at 11:06:13PM -0400, Anne Archibald wrote:
> On 11/04/07, Bill Baxter <wbaxter@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.

Thank you for taking the time to write those tests!

Failures may be expressed using

NumpyTestCase.failIf(self, expr, msg=None)


More information about the Numpy-discussion mailing list