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 ( 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)