Skip to content

Commit 373d0f7

Browse files
committed
update
1 parent 268fc3e commit 373d0f7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/pygrib/_pygrib.pyx

+5-7
Original file line numberDiff line numberDiff line change
@@ -1322,9 +1322,9 @@ cdef class gribmessage(object):
13221322
else:
13231323
missval = 1.e30
13241324
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)
13281328
datarr = redtoreg(datarr, lonsperlat, missval=missval)
13291329
else:
13301330
nx = None
@@ -1562,8 +1562,7 @@ cdef class gribmessage(object):
15621562
if lat2 < lat1 and lats[-1] > lats[0]: lats = lats[::-1]
15631563
ny = self['Nj']
15641564
lonsperlat = self['pl'].astype(np.int32)
1565-
nx = lonsperlat.max()
1566-
print(lonsperlat.dtype, lonsperlat)
1565+
nx = (lonsperlat.astype(np.int32)).max()
15671566
lon1 = self['longitudeOfFirstGridPointInDegrees']
15681567
lon2 = self['longitudeOfLastGridPointInDegrees']
15691568
lons = np.linspace(lon1,lon2,nx)
@@ -1575,8 +1574,7 @@ cdef class gribmessage(object):
15751574
if self.expand_reduced:
15761575
ny = self['Nj']
15771576
lonsperlat = self['pl'].astype(np.int32)
1578-
nx = lonsperlat.max()
1579-
print(lonsperlat.dtype, lonsperlat)
1577+
nx = (lonsperlat.astype(np.int32)).max()
15801578
lat1 = self['latitudeOfFirstGridPointInDegrees']
15811579
lat2 = self['latitudeOfLastGridPointInDegrees']
15821580
lon1 = self['longitudeOfFirstGridPointInDegrees']

0 commit comments

Comments
 (0)