Skip to content

Commit 8ed87a0

Browse files
committed
Merge pull request #270 from AvlWx2014/patch-1
Update __init__.py
2 parents 89508c8 + 025d4f5 commit 8ed87a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3960,10 +3960,14 @@ def drawlsmask(self,land_color="0.8",ocean_color="w",lsmask=None,
39603960
if cylproj:
39613961
# stack grids side-by-side (in longitiudinal direction), so
39623962
# any range of longitudes may be plotted on a world map.
3963+
# in versions of NumPy later than 1.10.0, concatenate will
3964+
# not stack these arrays as expected. If axis 1 is outside
3965+
# the dimensions of the array, concatenate will now raise
3966+
# an IndexError. Using hstack instead.
39633967
lsmask_lons = \
3964-
np.concatenate((lsmask_lons,lsmask_lons[1:]+360),1)
3968+
np.hstack((lsmask_lons,lsmask_lons[1:] + 360))
39653969
lsmask = \
3966-
np.concatenate((lsmask,lsmask[:,1:]),1)
3970+
np.hstack((lsmask,lsmask[:,1:]))
39673971
else:
39683972
if lakes: lsmask = np.where(lsmask==2,np.array(0,np.uint8),lsmask)
39693973

0 commit comments

Comments
 (0)