python - Memory error in np.hstack() -


i trying execute code:

for in fil:       k in datarr:           = np.zeros(0)           j in bui:               = np.hstack([a,datdifcor[k][i,j]])           datdifplt[k].update({i:a})   

but gives me error:

traceback (most recent call last):     file "<ipython console>", line 5, in <module>     file "c:\python26\lib\site-packages\numpy\core\shape_base.py", line 258, in hstack       return _nx.concatenate(map(atleast_1d,tup),1)   memoryerror 

i thought due lack of ram memory in first place, tried in on pc 48 gb of ram , gave same error. have reached maximum size numpy.array?

a memoryerror means attempt allocate memory failed. trying create array bigger maximum array size results in valueerror:

>>> = numpy.arange(500000000) >>> numpy.hstack((a, a)) traceback (most recent call last):   file "<stdin>", line 1, in <module>   file "/usr/lib/pymodules/python2.6/numpy/core/shape_base.py", line 258, in hstack     return _nx.concatenate(map(atleast_1d,tup),1) valueerror: array big. 

note 48 gb finite ammount of memory, , operating system (or hardware platform) might restrict size of single process 4 gb.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -