[Numpy-discussion] setmember1d memory leak?

Robert Kern robert.kern at gmail.com
Mon Jan 22 15:21:33 CST 2007


Per B. Sederberg wrote:

> So the next question is what changed to fix that bug?  It looks like the only
> difference in the code is that the call to argsort now has (kind='mergesort').

Possibly the default sort code had a bug that was fixed, too, or something deep
in the array object. I've rerun the above test after removing the
kind='mergesort', and I still see no leak.

> Also, why does setmember1d require unique elements?  It seems as though that
> really narrows its uses.

The algorithm it uses requires it. That's how it can be fast and not written
with for loops.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco


More information about the Numpy-discussion mailing list