Re: [Numpy-discussion] PATCH: reference leaks for 'numpy.core._internal' module object

2010-07-03 Thread Pauli Virtanen
Sat, 03 Jul 2010 01:11:20 -0300, Lisandro Dalcin wrote: > The simple test below show the issue. [clip: patch] Thanks, applied in r8469. [clip] > PS: I think that such implementation should at least handle the very > simple one/two character format (eg, 'i', 'f', 'd', 'Zf', 'Zd', etc.) > without c

[Numpy-discussion] PATCH: reference leaks for 'numpy.core._internal' module object

2010-07-02 Thread Lisandro Dalcin
The simple test below show the issue. import sys import numpy as np from numpy.core import _internal def f(a = np.zeros(4)): a = np.zeros(4) b = memoryview(a) c = np.asarray(b) print sys.getrefcount(_internal) while 1: f() The patch it trivial (I've added a little extra, unr