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

2006-08-13 Thread Todd Miller
Francesc Altet wrote: > 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

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)

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 Tra

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 = _numarray._arra

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 consumpt

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

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): numpy.zeros(dtype

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 consumpt

[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