GeoscienceAustralia / dea-notebooks

Repository for Digital Earth Australia Jupyter Notebooks: tools and workflows for geospatial analysis with Open Data Cube and Xarray
https://docs.dea.ga.gov.au/notebooks/
Apache License 2.0
446 stars 128 forks source link

Loading WOFS from the datacube uses np.bool which is not compatible with recent versions of numpy #1079

Closed SamKDawsonDPE closed 1 year ago

SamKDawsonDPE commented 1 year ago

Describe the bug/issue When loading WOFS data Datacube.load uses np.bool, which is deprecated in newer version of numpy and therefore loading WOFS data produces an error.

Steps to reproduce Steps to reproduce the behaviour: Load WOFS data using the recommended steps: wo = dc.load(product='ga_ls_wo_3', group_by='solar_day', fuse_func=wofs_fuser, like=MyData)

Expected behaviour An error that has the end description of:

AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Environment information DEA Sandbox (https://docs.dea.ga.gov.au/setup/sandbox.html)

robbibt commented 1 year ago

Closed by #1081