[Numpy-discussion] creating a Numeric array from a numpy array LEAKS memory

Travis E. Oliphant oliphant at enthought.com
Fri Oct 24 13:54:03 EDT 2008


Jose Borreguero wrote:
> Dear numpy users,
>
> I need to pass a Numeric array to some oldie code from a numpy array. 
> I decided to go like this:
>
> for i in range(BIGNUMER):
>     my_numpy_array=grabArray(i)
>     na=Numeric.array( my_numpy_array, Numeric.Float)
>     oldie_code(na)
>
> The constructor line:
> na=Numeric.array( my_numpy_array, Numeric.Float)
> does leak memory.
>
> Is there a way to pass the Numeric array to oldie_code without the leaks?
This should work without memory leaks, but there may be a bug in NumPy 
or Numeric.

Which version of Numeric and NumPy do you have?

-Travis




More information about the NumPy-Discussion mailing list