[Numpy-discussion] Memory leak?

Julian Taylor jtaylor.debian at googlemail.com
Fri Jan 31 04:29:34 EST 2014


which version of numpy are you using?
there seems to be a leak in the scalar return due to the PyObject_Malloc
usage in git master, but it doesn't affect 1.8.0


On Fri, Jan 31, 2014 at 7:20 AM, Chris Laumann <chris.laumann at gmail.com>wrote:

> Hi all-
>
> The following snippet appears to leak memory badly (about 10 MB per
> execution):
>
> P = randint(0,2,(30,13))
>
> for i in range(50):
>     print "\r", i, "/", 50
>     for ai in ndindex((2,)*13):
>         j = np.sum(P.dot(ai))
>
> If instead you execute (no np.sum call):
>
> P = randint(0,2,(30,13))
>
> for i in range(50):
>     print "\r", i, "/", 50
>     for ai in ndindex((2,)*13):
>         j = P.dot(ai)
>
> There is no leak.
>
> Any thoughts? I'm stumped.
>
> Best, Chris
>
> --
> Chris Laumann
> Sent with Airmail
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140131/780b0331/attachment.html>


More information about the NumPy-Discussion mailing list