我想绘制一个包含2000万个对象的数组,我有8GB的RAM,但当我运行以下代码时仍然出现以下错误:
import matplotlib.pyplot as plt
import numpy as np
d = np.arange(200000000)
plt.plot(d)
plt.show()
错误:
Traceback (most recent call last):
...
File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 317, in _grab_next_args
for seg in self._plot_args(remaining, kwargs):
File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 292, in _plot_args
x = np.arange(y.shape[0], dtype=float)
MemoryError