Skip to content

Commit

Permalink
2nd attempt to fix failing windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
jswhit committed Jul 2, 2024
1 parent 055e6aa commit 23874cd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pygrib/_pygrib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ npc.import_array()
ctypedef fused float_type:
float
double
ctypedef fused int_type:
long
long long

def redtoreg(float_type[:] redgrid_data, long[:] lonsperlat, missval=None):
def redtoreg(float_type[:] redgrid_data, int_type[:] lonsperlat, missval=None):
"""
redtoreg(redgrid_data, lonsperlat, missval=None)
Expand Down Expand Up @@ -1318,8 +1321,8 @@ cdef class gribmessage(object):
else:
missval = 1.e30
if self.expand_reduced:
lonsperlat = self['pl'].astype(np.int64)
nx = self['pl'].max()
lonsperlat = self['pl']
nx = lonsperlat.max()
datarr = redtoreg(datarr, lonsperlat, missval=missval)
else:
nx = None
Expand Down

0 comments on commit 23874cd

Please sign in to comment.