Skip to content

Commit 3c8c7ff

Browse files
committed
update
1 parent 197966d commit 3c8c7ff

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/pygrib/_pygrib.pyx

+6-7
Original file line numberDiff line numberDiff line change
@@ -1196,13 +1196,12 @@ cdef class gribmessage(object):
11961196
raise RuntimeError(_get_error_message(err))
11971197
return longval
11981198
else: # array
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_)
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_)
12061205
err = grib_get_long_array(self._gh, name, <long *>datarr.data, &size)
12071206
if err:
12081207
raise RuntimeError(_get_error_message(err))

0 commit comments

Comments
 (0)