[Tutor] numpy memory muncher

Joel Levine Joel.Levine at Dartmouth.EDU
Sat Nov 11 21:40:42 CET 2006


I'm using, perhaps misusing numpy which is eating up the memory and, eventually crashing my program.

Isolating it, the following piece of code continually eats memory.  Is it my program or what ...? 
Thanks
Joel Levine

Using Mac OSX 10.4.7
Not clear on versions:  Appears to be 0.9.8 with py2.4

-----------------

from numpy import *

a=zeros((2000,100),float)
while True:
    for row in range(2000):
        for col in range(100):
            x=a[row,col]
            #if x!=0: print "?"
    





More information about the Tutor mailing list