@@ -1322,9 +1322,9 @@ cdef class gribmessage(object):
1322
1322
else :
1323
1323
missval = 1.e30
1324
1324
if self .expand_reduced:
1325
- lonsperlat = self [' pl' ].astype(np.int32)
1326
- nx = lonsperlat.max()
1327
- print (lonsperlat.dtype, lonsperlat )
1325
+ lonsperlat = self [' pl' ]
1326
+ nx = ( lonsperlat.astype(np.int32)) .max()
1327
+ print (lonsperlat.dtype, nx )
1328
1328
datarr = redtoreg(datarr, lonsperlat, missval = missval)
1329
1329
else :
1330
1330
nx = None
@@ -1562,8 +1562,7 @@ cdef class gribmessage(object):
1562
1562
if lat2 < lat1 and lats[- 1 ] > lats[0 ]: lats = lats[::- 1 ]
1563
1563
ny = self [' Nj' ]
1564
1564
lonsperlat = self [' pl' ].astype(np.int32)
1565
- nx = lonsperlat.max()
1566
- print (lonsperlat.dtype, lonsperlat)
1565
+ nx = (lonsperlat.astype(np.int32)).max()
1567
1566
lon1 = self [' longitudeOfFirstGridPointInDegrees' ]
1568
1567
lon2 = self [' longitudeOfLastGridPointInDegrees' ]
1569
1568
lons = np.linspace(lon1,lon2,nx)
@@ -1575,8 +1574,7 @@ cdef class gribmessage(object):
1575
1574
if self .expand_reduced:
1576
1575
ny = self [' Nj' ]
1577
1576
lonsperlat = self [' pl' ].astype(np.int32)
1578
- nx = lonsperlat.max()
1579
- print (lonsperlat.dtype, lonsperlat)
1577
+ nx = (lonsperlat.astype(np.int32)).max()
1580
1578
lat1 = self [' latitudeOfFirstGridPointInDegrees' ]
1581
1579
lat2 = self [' latitudeOfLastGridPointInDegrees' ]
1582
1580
lon1 = self [' longitudeOfFirstGridPointInDegrees' ]
0 commit comments