Skip to content

Commit

Permalink
pygrass: replace deprecated numpy.bool with bool (#2949)
Browse files Browse the repository at this point in the history
* another deprecated alias replaced in GUI scatterplot
  • Loading branch information
petrasovaa committed May 8, 2023
1 parent e04e4f0 commit 3c14eaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gui/wxpython/iscatt/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,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 (
Expand Down
2 changes: 1 addition & 1 deletion python/grass/pygrass/raster/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3c14eaf

Please sign in to comment.