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
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
This still occurs in numpy 1.0.3.1 so must have been fixed between that and your 1.0.4-5 version. By the way the memory problem crashes my Intel Mac Book Pro (system 10.4.11) with the gray screen and black dialog box telling me to restart my computer. A very UN-unix like and UN-Mac like way of handling a memory problem IMHO. Let us Mac people not be too smug. -- Lou Pecora --- Alexandre Fayolle <alexandre.fayolle@logilab.fr> wrote:
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
____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
A Tuesday 29 January 2008, Lou Pecora escrigué:
This still occurs in numpy 1.0.3.1 so must have been fixed between that and your 1.0.4-5 version.
It works here and I'm using NumPy 1.0.3, Python 2.5.1 on a Ubuntu 7.10 / Pentium4 machine.
By the way the memory problem crashes my Intel Mac Book Pro (system 10.4.11) with the gray screen and black dialog box telling me to restart my computer. A very UN-unix like and UN-Mac like way of handling a memory problem IMHO. Let us Mac people not be too smug.
Um, it would be nice if some other Mac-user can reproduce your problem. Perhaps you are suffering some other problem that can be exposed by this code snip. Cheers, --
0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-"
Hmmm... Interesting. I am using Python 2.4.4. It would be nice to have other Mac people with same/other Python and numpy versions try the argsort "bug" code. -- Lou Pecora --- Francesc Altet <faltet@carabos.com> wrote:
A Tuesday 29 January 2008, Lou Pecora escrigué:
This still occurs in numpy 1.0.3.1 so must have been fixed between that and your 1.0.4-5 version.
It works here and I'm using NumPy 1.0.3, Python 2.5.1 on a Ubuntu 7.10 / Pentium4 machine.
By the way the memory problem crashes my Intel Mac Book Pro (system 10.4.11) with the gray screen and black dialog box telling me to restart my computer. A very UN-unix like and UN-Mac like way of handling a memory problem IMHO. Let us Mac people not be too smug.
Um, it would be nice if some other Mac-user can reproduce your problem. Perhaps you are suffering some other problem that can be exposed by this code snip.
Cheers,
--
0,0< Francesc Altet http://www.carabos.com/
-- Lou Pecora, my views are my own. ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
On Jan 29, 2008 7:16 PM, Lou Pecora <lou_boog2000@yahoo.com> wrote:
Hmmm... Interesting. I am using Python 2.4.4. It would be nice to have other Mac people with same/other Python and numpy versions try the argsort "bug" code.
I don't see any memory leak with the test code. Mac OS X 10.5.1 Python 2.5.1 (not apple one) Numpy 1.0.5.dev4722 Robin
* Robin <robince@gmail.com> [2008-01-29 19:23:11 +0000]:
On Jan 29, 2008 7:16 PM, Lou Pecora <lou_boog2000@yahoo.com> wrote:
Hmmm... Interesting. I am using Python 2.4.4. It would be nice to have other Mac people with same/other Python and numpy versions try the argsort "bug" code.
I don't see any memory leak with the test code. Mac OS X 10.5.1 Python 2.5.1 (not apple one) Numpy 1.0.5.dev4722
I have run the test1 code again, this time on my laptop PC (no MAC-user, sorry) using the last stable numpy release. The memory problem does _not_ show up now. I'm running with: - Ubuntu Feisty (kernel 2.6.17-12-generic i686) - python 2.5.1 (Feisty package) - numpy 1.0.4 (compiled with gcc version 4.1.2) However, the memory leak appears on my laptop if I use python 2.5.1 with numpy 1.0.1. At least here, this seems to be an issue dependent only on the numpy version, and a solved one. -- oriol
participants (5)
-
Alexandre Fayolle
-
Francesc Altet
-
Lou Pecora
-
Oriol Vendrell
-
Robin