[Numpy-discussion] numpy.any oddity

Suchindra Sandhu suchindra@gmail....
Sat Feb 7 09:08:34 CST 2009


Thanks. I tried the latest version and indeed there is no leak.

Cheers,
Suchindra

On Fri, Feb 6, 2009 at 3:39 PM, Robert Kern <robert.kern@gmail.com> wrote:

> On Fri, Feb 6, 2009 at 13:24, Suchindra Sandhu <suchindra@gmail.com>
> wrote:
> > Hi,
> >
> > I accidently stumbled upon this odd behavior by numpy.any. The following
> > code leaks memory -
> >
> > for i in xrange(10000000):
> >         print N.any({'whatever': N.arange(10000000)})
> >
> > Ofcourse, I called "any" on a dict object by accident, but it should not
> > really leak memory.
> >
> > I am running numpy version 1.0.4 with python 2.5.2
>
> Upgrade to a more recent version of numpy. I do not see a leak. I
> vaguely recall there being a problem in the 1.0.x series with
> object-dtype scalars, which is what numpy.any() will convert a dict
> to.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090207/6bcbc5b8/attachment.html 


More information about the Numpy-discussion mailing list