运行my_map.bluemarble()
时,收到此错误消息,而如果删除my_map.bluemarble()
,则程序运行正常!
我该怎么办?
谢谢!Traceback (most recent call last): File "C:\Workspace\after201512\2015CCN2\plot_CCN_map.py", line 54, in <module> my_map.bluemarble() File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 3982, in bluemarble return self.warpimage(image='bluemarble',scale=scale,**kwargs) File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 4144, in warpimage self._bm_lons,self._bm_lats,nx,ny,returnxy=True) File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 2966, in transform_scalar datout = interp(datin,lons,lats,lonsout,latsout,checkbounds=checkbounds,order=order,masked=masked) File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py", line 4960, in interp (1.-delx)*dely*datain[yip1,xi] + \MemoryError
最佳答案
documentation指出它使用了大量内存,但是可以使用scale
参数对图像进行下采样:
my_map.bluemarble(scale=0.5)