Skip to content

Commit b1fa277

Browse files
committed
BUG: use integer division where appropriate
1 parent faa1598 commit b1fa277

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3551,7 +3551,7 @@ def contour(self,x,y,data,*args,**kwargs):
35513551
# with the shiftgrid function.
35523552
# only do this check for global projections.
35533553
if self.projection in _cylproj + _pseudocyl:
3554-
xx = x[x.shape[0]/2,:]
3554+
xx = x[x.shape[0]//2,:]
35553555
condition = (xx >= self.xmin) & (xx <= self.xmax)
35563556
xl = xx.compress(condition).tolist()
35573557
xs = xl[:]
@@ -3653,7 +3653,7 @@ def contourf(self,x,y,data,*args,**kwargs):
36533653
# with the shiftgrid function.
36543654
# only do this check for global projections.
36553655
if self.projection in _cylproj + _pseudocyl:
3656-
xx = x[x.shape[0]/2,:]
3656+
xx = x[x.shape[0]//2,:]
36573657
condition = (xx >= self.xmin) & (xx <= self.xmax)
36583658
xl = xx.compress(condition).tolist()
36593659
xs = xl[:]
@@ -3956,7 +3956,7 @@ def drawlsmask(self,land_color="0.8",ocean_color="w",lsmask=None,
39563956
if self.projection in _pseudocyl:
39573957
lons, lats = self(x, y, inverse=True)
39583958
lon_0 = self.projparams['lon_0']
3959-
lats = lats[:,nx/2]
3959+
lats = lats[:,nx//2]
39603960
lons1 = (lon_0+180.)*np.ones(lons.shape[0],np.float64)
39613961
lons2 = (lon_0-180.)*np.ones(lons.shape[0],np.float64)
39623962
xmax,ytmp = self(lons1,lats)
@@ -4319,7 +4319,7 @@ def wmsimage(self,server,\
43194319
from xpixels and the aspect ratio of the
43204320
map projection region.
43214321
format desired image format (default 'png')
4322-
alpha The alpha blending value,
4322+
alpha The alpha blending value,
43234323
between 0 (transparent) and 1 (opaque) (default None)
43244324
verbose if True, print WMS server info (default
43254325
False).
@@ -5198,7 +5198,7 @@ def _readlsmask(lakes=True,resolution='l',grid=5):
51985198
nlons = 17280
51995199
else:
52005200
raise ValueError('grid for land/sea mask must be 10,5,2.5 or 1.25')
5201-
nlats = nlons/2
5201+
nlats = nlons//2
52025202
import gzip
52035203
lsmaskf =\
52045204
gzip.open(os.path.join(basemap_datadir,'lsmask_%smin_%s.bin' %\

0 commit comments

Comments
 (0)