Skip to content

Commit

Permalink
remove deprecated calls to np.bool #261
Browse files Browse the repository at this point in the history
  • Loading branch information
hboisgon committed Apr 3, 2024
1 parent 2bf48c8 commit 565c9f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hydromt_wflow/workflows/basemaps.py
Expand Up @@ -85,7 +85,7 @@ def hydrography(
outidx = None
if "mask" not in ds.coords and xy is None:
ds.coords["mask"] = xr.Variable(
dims=ds.raster.dims, data=np.ones(ds.raster.shape, dtype=np.bool)
dims=ds.raster.dims, data=np.ones(ds.raster.shape, dtype=bool)
)
elif "mask" not in ds.coords:
# NOTE if no subbasin mask is provided calculate it here
Expand Down Expand Up @@ -154,7 +154,7 @@ def hydrography(
mask_int.raster.set_nodata(-1) # change nodata value
ds_out.coords["mask"] = mask_int.raster.reproject_like(
da_flw, method="nearest"
).astype(np.bool)
).astype(bool)
basins = ds_out["mask"].values.astype(np.int32)
logger.warning(
"The basin delineation might be wrong as no original resolution outlets"
Expand Down
2 changes: 1 addition & 1 deletion hydromt_wflow/workflows/river.py
Expand Up @@ -521,7 +521,7 @@ def _width_fit(
p0=[0.15, 0.65],
logger=logger, # rhine uparea based
):
outliers = np.full(np.sum(mask), False, dtype=np.bool)
outliers = np.full(np.sum(mask), False, dtype=bool)
a, b = None, None
# check if sufficient data
if np.sum(mask) > 10:
Expand Down

0 comments on commit 565c9f7

Please sign in to comment.