Memory error only in Spyder IDE

强颜欢笑 提交于 2019-12-30 11:05:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!