[Numpy-discussion] At.: question about RAM problem in numpy array code

Josè Luis Mietta joseluismietta at yahoo.com.ar
Mon Aug 19 12:33:10 EDT 2013


 Hi experts!

I have a core i3 3GB RAM Toshiba laptop. Im a newby Ubuntu 13.04, python and sage user. I note that RAM memory becomes full while running script (starts in 50% of RAM ocupation and becomes to 100% (full)). This generate that operating system become slower... In the code few numpy arrays are gereated (each one with ~700 elements or more).
The script looks like this:
  OUTPUT=[]
  number of elements=[n1,n2,.....]
  numbers of executions =N
  forj innumber of elements:
        lalala=[]
        fori insrange(N):
             Algorithmisexecuted 'N'times an append one value inarray 'lalala'each time.Ineach execution three numpy matrix of 300x 300(=90000)elements (each one)participate.Thismatrix are called 'M','M_v'and'M_h'andare re-generated foreach 'i'index inthe for-cycle.
        Doingmath on all 'N'elements in'lalala'a 'pipipi'element isgenerated an thenappend intoOUTPUT array.

When execution ends the OUTPUT array have the same lenght that 'number of elements' array.
In each 'for' cycle, other arrayrs participate.
What can I do for throubleshooting that? IS possible that the algorithm and old arrays are saving in RAM memory? If tahts possible, how can I di for deleting that?
Waiting for your answers.
Thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130819/0a9ccd6c/attachment.html>


More information about the NumPy-Discussion mailing list