GeoscienceAustralia / digitalearthau

Code and tools for Digital Earth Australia (a deployment of Open Data Cube)
https://geoscienceaustralia.github.io/digitalearthau/
31 stars 21 forks source link

This repo uses numpy.bool which is not compatible with recent versions of numpy #328

Open SpacemanPaul opened 1 year ago

SpacemanPaul commented 1 year ago

As reported on Slack, the numpy.bool type is used in https://github.com/GeoscienceAustralia/digitalearthau/blob/develop/digitalearthau/utils.py (and possibly elsewhere in this repo).

Recent versions of numpy fail on this with an AttributeError:

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

robbibt commented 1 year ago

I would have a preference to deprecate the wofs_fuser function here, and instead re-direct users to the copy of the function inside dea_tools: https://github.com/GeoscienceAustralia/dea-notebooks/blob/develop/Tools/dea_tools/datahandling.py#L681-L691