Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address numpy 1.20 builtin deprecations #187

Merged
merged 1 commit into from
Sep 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pygrib/_pygrib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ cdef class gribmessage(object):
raise RuntimeError(grib_get_error_message(err))
elif typ == GRIB_TYPE_LONG:
# is value an array or a scalar?
datarr = np.asarray(value, np.int)
datarr = np.asarray(value, int)
is_array = False
if datarr.shape:
is_array = True
Expand All @@ -1071,7 +1071,7 @@ cdef class gribmessage(object):
raise RuntimeError(grib_get_error_message(err))
elif typ == GRIB_TYPE_DOUBLE:
# is value an array or a scalar?
datarr = np.asarray(value, np.float)
datarr = np.asarray(value, float)
is_array = False
if datarr.shape:
is_array = True
Expand Down Expand Up @@ -1142,7 +1142,7 @@ cdef class gribmessage(object):
storageorder='F'
else:
storageorder='C'
datarr = np.zeros(size, np.int, order=storageorder)
datarr = np.zeros(size, int, order=storageorder)
err = grib_get_long_array(self._gh, name, <long *>datarr.data, &size)
if err:
raise RuntimeError(grib_get_error_message(err))
Expand Down