From ec2c6a87198b7c2f540dd2e142287482dc50fd21 Mon Sep 17 00:00:00 2001 From: Anna Petrasova Date: Fri, 5 May 2023 08:20:28 -0400 Subject: [PATCH 1/2] pygrass: replace deprecated numpy.bool with bool --- python/grass/pygrass/raster/buffer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/grass/pygrass/raster/buffer.py b/python/grass/pygrass/raster/buffer.py index 729d11e79cd..acdf2b03e6e 100644 --- a/python/grass/pygrass/raster/buffer.py +++ b/python/grass/pygrass/raster/buffer.py @@ -48,7 +48,7 @@ def __array_wrap__(self, out_arr, context=None): """See: http://docs.scipy.org/doc/numpy/user/ basics.subclassing.html#array-wrap-for-ufuncs""" - if out_arr.dtype == np.bool: + if out_arr.dtype == bool: # there is not support for boolean maps, so convert into integer out_arr = out_arr.astype(np.int32) out_arr.p = out_arr.ctypes.data_as(out_arr.pointer_type) From 242afc34327bf5eb5fd7bb1834cbb938a8892020 Mon Sep 17 00:00:00 2001 From: Anna Petrasova Date: Fri, 5 May 2023 10:34:53 -0400 Subject: [PATCH 2/2] another deprecated alias --- gui/wxpython/iscatt/plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/wxpython/iscatt/plots.py b/gui/wxpython/iscatt/plots.py index 7a21f7d4185..80b0a2b2388 100644 --- a/gui/wxpython/iscatt/plots.py +++ b/gui/wxpython/iscatt/plots.py @@ -929,7 +929,7 @@ def set_data(self, A): self._full_res = A self._A = A - if self._A.dtype != np.uint8 and not np.can_cast(self._A.dtype, np.float): + if self._A.dtype != np.uint8 and not np.can_cast(self._A.dtype, float): raise TypeError("Image data can not convert to float") if self._A.ndim not in (2, 3) or (