Hi Everybody:
I was having a massive memory leak problem in some simulations I coded that I
traced down to the setmember1d method. After running for about an hour, my
program, which should have been taking up .6% of the RAM was taking up 100% of
my 4GB of RAM and would eventually get killed by th
Per B. Sederberg wrote:
> Does anyone have any idea of what might be occurring in setmember1d in
> combination with this setup that would cause such a massive memory leak?
Can you check out numpy from SVN and see if you can reproduce the leak? I do not
see a leak with a recent checkout on OS X wit
Robert Kern gmail.com> writes:
>
> Per B. Sederberg wrote:
> > Does anyone have any idea of what might be occurring in setmember1d in
> > combination with this setup that would cause such a massive memory leak?
>
> Can you check out numpy from SVN and see if you can reproduce the leak?
> I do
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
I would also like to see a method that doesn't have the unique members
requirement.
If setmember1d cannot be modified to do that, is there another method
that doesn't have these restrictions. Or could one be added?
Thanks,
Jan
___
Numpy-discussion mai
Jan Strube wrote:
> I would also like to see a method that doesn't have the unique members
> requirement.
> If setmember1d cannot be modified to do that, is there another method
> that doesn't have these restrictions. Or could one be added?
If you can write one that's reasonably efficient, yes.
-
Robert Kern wrote:
> Jan Strube wrote:
>> I would also like to see a method that doesn't have the unique members
>> requirement.
>> If setmember1d cannot be modified to do that, is there another method
>> that doesn't have these restrictions. Or could one be added?
>
> If you can write one that's
Robert Cimrman wrote:
> Robert Kern wrote:
>> Jan Strube wrote:
>>> I would also like to see a method that doesn't have the unique members
>>> requirement.
>>> If setmember1d cannot be modified to do that, is there another method
>>> that doesn't have these restrictions. Or could one be added?
>> I
Robert Kern wrote:
> Robert Cimrman wrote:
>> Or you could just call unique1d prior to your call to setmember1d - it
>> was meant to be used that way... you would not loose much speed that
>> way, IMHO.
>
> But that doesn't do what they want. They want a function that gives the mask
> against thei
Robert Cimrman wrote:
> Robert Kern wrote:
>> Robert Cimrman wrote:
>>> Or you could just call unique1d prior to your call to setmember1d - it
>>> was meant to be used that way... you would not loose much speed that
>>> way, IMHO.
>> But that doesn't do what they want. They want a function that giv
On 1/24/07, Robert Cimrman <[EMAIL PROTECTED]> wrote:
Robert Kern wrote:
> Robert Cimrman wrote:
>> Or you could just call unique1d prior to your call to setmember1d - it
>> was meant to be used that way... you would not loose much speed that
>> way, IMHO.
>
> But that doesn't do what they want.
On 1/24/07, Charles R Harris <[EMAIL PROTECTED]> wrote:
On 1/24/07, Robert Cimrman <[EMAIL PROTECTED]> wrote:
>
> Robert Kern wrote:
> > Robert Cimrman wrote:
> >> Or you could just call unique1d prior to your call to setmember1d -
> it
> >> was meant to be used that way... you would not loose
Charles R Harris wrote:
> On 1/24/07, Charles R Harris <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> On 1/24/07, Robert Cimrman <[EMAIL PROTECTED]> wrote:
>> >
>> > Robert Kern wrote:
>> > > Robert Cimrman wrote:
>> > >> Or you could just call unique1d prior to your call to setmember1d -
>> > it
>> > >> w
Robert Cimrman wrote:
> Charles R Harris wrote:
>>
>> In [7]: def countmembers(a1, a2) :
>> ...: a = sort(a2)
>> ...: il = a.searchsorted(a1, side='l')
>> ...: ir = a.searchsorted(a1, side='r')
>> ...: return ir - il
>> ...:
>> The subtraction can be replaced by != to get
;s actually true.
I found it easier to state my problem in terms of unique arrays rather than
trying to figure out a general solution, but countmembers sure is nice.
Jan
-- Forwarded message --
From: Robert Cimrman <[EMAIL PROTECTED]>
To: Discussion of Numerical Py
On 1/25/07, Robert Cimrman <[EMAIL PROTECTED]> wrote:
Robert Cimrman wrote:
> Charles R Harris wrote:
>>
>> In [7]: def countmembers(a1, a2) :
>> ...: a = sort(a2)
>> ...: il = a.searchsorted(a1, side='l')
>> ...: ir = a.searchsorted(a1, side='r')
>> ...: return ir - il
>
Charles R Harris wrote:
> This would be easy to add. I could put in an option side='mask' that
> would return 1 if the object is found, 0 otherwise. The type would be
> integer rather than boolean but I don't see that as a big problem. If I
> add that, I would like to change the keyword to mode in
17 matches
Mail list logo