Re: [Numpy-discussion] Memory leak in array protocol numarray--numpy

2006-08-12 Thread Todd Miller
Travis Oliphant wrote: As far as numpy knows this is all it's supposed to do. This seems to indicate that something is going on inside numarray.array(a) because once you had that line to the loop, memory consumption shows up. In fact, you can just add the line a =

Re: [Numpy-discussion] Memory leak in array protocol numarray--numpy

2006-08-12 Thread Todd Miller
I agree with all of Travis' comments below and committed the suggested changes to numarray CVS. I found one other numarray change needed for Francesc's examples to run (apparently) leak-free: Py_INCREF(obj) Py_XDECREF(a-base) a-base = obj Py_DECREF(cobj) Thanks Travis! Regards, Todd

Re: [Numpy-discussion] Memory leak in array protocol numarray --numpy

2006-08-12 Thread Francesc Altet
A Dissabte 12 Agost 2006 14:37, Todd Miller va escriure: I agree with all of Travis' comments below and committed the suggested changes to numarray CVS. I found one other numarray change needed for Francesc's examples to run (apparently) leak-free: Py_INCREF(obj) Py_XDECREF(a-base)

[Numpy-discussion] Memory leak in array protocol numarray--numpy

2006-08-11 Thread Francesc Altet
Hi, I was tracking down a memory leak in PyTables and it boiled down to a problem in the array protocol. The issue is easily exposed by: for i in range(100): numarray.array(numpy.zeros(dtype=numpy.float64, shape=3)) and looking at the memory consumption of the process. The same happens

Re: [Numpy-discussion] Memory leak in array protocol numarray--numpy

2006-08-11 Thread Todd Miller
Francesc Altet wrote: Hi, I was tracking down a memory leak in PyTables and it boiled down to a problem in the array protocol. The issue is easily exposed by: for i in range(100): numarray.array(numpy.zeros(dtype=numpy.float64, shape=3)) and looking at the memory consumption of

Re: [Numpy-discussion] Memory leak in array protocol numarray--numpy

2006-08-11 Thread Travis Oliphant
Todd Miller wrote: I looked at this a little with a debug python and figure it's a bug in numpy.zeros(): Hmmm. I thought of that, but could not get any memory leak by just creating zeros in a four loop. In other words: for i in xrange(1000):

Re: [Numpy-discussion] Memory leak in array protocol numarray--numpy

2006-08-11 Thread Travis Oliphant
Francesc Altet wrote: Hi, I was tracking down a memory leak in PyTables and it boiled down to a problem in the array protocol. The issue is easily exposed by: for i in range(100): numarray.array(numpy.zeros(dtype=numpy.float64, shape=3)) More data: The following code does not

Re: [Numpy-discussion] Memory leak in array protocol numarray--numpy

2006-08-11 Thread Travis Oliphant
Francesc Altet wrote: Hi, I was tracking down a memory leak in PyTables and it boiled down to a problem in the array protocol. The issue is easily exposed by: for i in range(100): numarray.array(numpy.zeros(dtype=numpy.float64, shape=3)) and looking at the memory consumption of

Re: [Numpy-discussion] memory leak in array

2006-06-21 Thread Travis Oliphant
[EMAIL PROTECTED] wrote: Hi Travis Not sure if you've had a chance to look at the previous code I sent or not, but I was able to reduce the code (see below) to its smallest size and still have the problem, albeit at a slower rate. The problem appears to come from changing values in the