[Numpy-discussion] argsort memory problem?

Oriol Vendrell ovendrell@gmail....
Tue Jan 29 07:58:15 CST 2008


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.

Any suggestions?

Thanks,

-- 
Oriol Vendrell
ovendrell@gmail.com


More information about the Numpy-discussion mailing list