@@ -36,12 +36,9 @@ def redtoreg(float_type[:] redgrid_data, int_type[:] lonsperlat, missval=None):
36
36
Includes handling of missing values using nearest neighbor interpolation.
37
37
"""
38
38
39
- # cdef cython.Py_ssize_t nlons = np.max(lonsperlat)
40
- # cdef cython.Py_ssize_t nlats = lonsperlat.shape[0]
41
- cdef int nlons = np.max(lonsperlat)
42
- cdef int nlats = lonsperlat.shape[0 ]
43
- # cdef cython.Py_ssize_t i,j,indx,ilons,im,ip,nlona
44
- cdef int i,j,indx,ilons,im,ip,nlona
39
+ cdef cython.Py_ssize_t nlons = np.max(lonsperlat)
40
+ cdef cython.Py_ssize_t nlats = lonsperlat.shape[0 ]
41
+ cdef cython.Py_ssize_t i,j,indx,ilons,im,ip,nlona
45
42
cdef float_type zxi, zdx, flons, missvalc
46
43
if float_type is float :
47
44
float_dtype = np.float32
@@ -1199,15 +1196,14 @@ cdef class gribmessage(object):
1199
1196
raise RuntimeError (_get_error_message(err))
1200
1197
return longval
1201
1198
else : # array
1202
- if os.name == ' nt' :
1203
- # this should not be necessary since np.int_ should
1204
- # be platform-dependent long, which should map to 32-bits on windows?
1205
- datarr = np.zeros(size, np.int32)
1206
- else :
1207
- datarr = np.zeros(size, np.int_)
1208
- print ( ' getting long_array ' , size)
1199
+ # if os.name == 'nt':
1200
+ # # this should not be necessary since np.int_ should
1201
+ # # be platform-dependent long, which should map to 32-bits on windows?
1202
+ # datarr = np.zeros(size, np.int32)
1203
+ # else:
1204
+ # datarr = np.zeros(size, np.int_)
1205
+ datarr = np.zeros( size, np.int_ )
1209
1206
err = grib_get_long_array(self ._gh, name, < long * > datarr.data, & size)
1210
- print (' getting long_array' ,datarr.min(), datarr.max())
1211
1207
if err:
1212
1208
raise RuntimeError (_get_error_message(err))
1213
1209
if key == ' values' :
0 commit comments