[Numpy-discussion] argsort memory problem?

Alexandre Fayolle alexandre.fayolle at logilab.fr
Tue Jan 29 09:28:35 EST 2008


On Tue, Jan 29, 2008 at 02:58:15PM +0100, Oriol Vendrell wrote:
> Hi all,
> 
> I've noticed something that looks like an odd behaviour in array.argsort().
> 
> 
> # test1 ---------------------
> from numpy import array
> while True:
>     a=array([8.0,7.0,6.0,5.0,4.0,2.0])
>     i=a.argsort()
> # ---------------------------
> 
> # test2 ---------------------
> from numpy import array
> a=array([8.0,7.0,6.0,5.0,4.0,2.0])
> while True:
>     i=a.argsort()
> # ---------------------------
> 
> 
> test1 runs out of memory after a few minutes, it seems that in each cycle
> some memory is allocated and never returned back.
> test2 runs fine until killed.
> 
> I'm unsure if I'm missing something or if this could be a bug. I'm using
> numpy 1.0.1 with python 2.4.4 in a debian stable system.

Certainly a bug, but it has been fixed and I cannot reproduce in debian
sid (using 1.0.4-5) 

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 481 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080129/dd686cac/attachment.sig>


More information about the NumPy-Discussion mailing list