Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated np.bool from basemaps workflow #261

Closed
2 tasks done
hboisgon opened this issue Mar 28, 2024 · 0 comments · Fixed by #263
Closed
2 tasks done

Remove deprecated np.bool from basemaps workflow #261

hboisgon opened this issue Mar 28, 2024 · 0 comments · Fixed by #263
Assignees
Labels
bug Something isn't working workflows Issue linked to the workflows
Milestone

Comments

@hboisgon
Copy link
Contributor

HydroMT-Wflow version checks

  • I have checked that this issue has not already been reported.
  • I have checked that this bug exists on the latest version of HydroMT-Wflow.

Reproducible Example

Build wflow with {'subbasin': [11.12, 44.54]} or {'subbasin': [11.12, 44.54], 'strord': 4}
res: 0.00833

Current behaviour

np.bool is used

Desired behaviour

Use python bool directly

Additional context

This part should be updated

else:
# This is a patch for basins which are clipped based on bbox or wrong geom
mask_int = ds["mask"].astype(np.int8)
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)
basins = ds_out["mask"].values.astype(np.int32)
logger.warning(
"The basin delineation might be wrong as no original resolution outlets"
" are found in the upscaled map."
)

@hboisgon hboisgon added bug Something isn't working needs refinement issue still needs refinement workflows Issue linked to the workflows and removed needs refinement issue still needs refinement labels Mar 28, 2024
@hboisgon hboisgon self-assigned this Apr 3, 2024
hboisgon added a commit that referenced this issue Apr 3, 2024
@hboisgon hboisgon added this to the 0.6 release milestone Apr 8, 2024
@hboisgon hboisgon mentioned this issue Apr 11, 2024
4 tasks
hboisgon added a commit that referenced this issue May 7, 2024
* remove deprecated calls to np.bool #261

* earlier error message if subbasin is too small #236

* add test

* update changelog

* bugfix test

* address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workflows Issue linked to the workflows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant