From 0c3ac54cfcc876da35c767c2ea8dce2b146ae740 Mon Sep 17 00:00:00 2001 From: akrherz Date: Fri, 6 Aug 2021 07:28:08 -0500 Subject: [PATCH] address numpy 1.20 builtin deprecations --- src/pygrib/_pygrib.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pygrib/_pygrib.pyx b/src/pygrib/_pygrib.pyx index 376e590b..864ac1eb 100644 --- a/src/pygrib/_pygrib.pyx +++ b/src/pygrib/_pygrib.pyx @@ -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 @@ -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 @@ -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, datarr.data, &size) if err: raise RuntimeError(grib_get_error_message(err))