Python 底图中 map.bluemarble() 的内存错误
Memory Error of map.bluemarble() in Python Basemap
当我 运行 my_map.bluemarble()
时,我收到此错误消息,而如果我删除 my_map.bluemarble()
,程序运行正常!
我该怎么办?
谢谢!
Traceback (most recent call last):
File "C:\Workspace\after20151215CCN2\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)
当我 运行 my_map.bluemarble()
时,我收到此错误消息,而如果我删除 my_map.bluemarble()
,程序运行正常!
我该怎么办?
谢谢!
Traceback (most recent call last):
File "C:\Workspace\after20151215CCN2\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)