问题
doing the following causes a MemoryError in my Spyder Python IDE:
>>> from numpy import *
>>> a_flt = ones((7000,7000), dtype=float64)+4
>>> b_flt = ones((7000,7000), dtype=float64)+1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError
>>>
THis is weird, since the memory usage in the statusbar of Spyder shows that only approx. 25% of my memory is used. Furthermore, when generating even a higher number of these large 7000*7000 arrays in the standard Python IDE GUI, everything works fine.
>>> from numpy import *
>>> a_flt = ones((7000,7000), dtype=float64)+4
>>> b_flt = ones((7000,7000), dtype=float64)+1
>>> c_flt = ones((7000,7000), dtype=float64)+1
>>> d_flt = ones((7000,7000), dtype=float64)+1
>>> e_flt = ones((7000,7000), dtype=float64)+1
Even with 5 floating point arrays created, memory requirements only amount to about a third of my total memory of 16GB. So this cannot be a real memory problem, then. I found a similiar question on this issue in a spyder google group https://groups.google.com/forum/#!msg/spyderlib/qE9tiriT91s/0x3s2Aw-efMJ, however no answer was provided. It would really be nice if someone could help me with this paradoxical situation.
Thanks in advance,
Patrick
回答1:
Install 64bit version of Python and Spyder. This eliminated me this error.
来源:https://stackoverflow.com/questions/25981984/memory-error-only-in-spyder-ide