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

styles/ramp.py:258: RuntimeWarning: invalid value encountered in cast #1060

Open
pjonsson opened this issue Aug 9, 2024 · 2 comments
Open

Comments

@pjonsson
Copy link
Contributor

pjonsson commented Aug 9, 2024

Noticed a warning relating to the real code in the unit-integration-performance-tests logs from the CI, so putting it here so it doesn't get lost:

integration_tests/test_wms_server.py::test_wms_multidate_getmap
  /code/datacube_ows/styles/ramp.py:258: RuntimeWarning: invalid value encountered in cast
    return val.astype("uint8")
@SpacemanPaul
Copy link
Contributor

IIRC recent versions of numpy have slightly odd behaviour wrt the uint8 dtype and this was nothing to worry about, but I'll flag it for a revisit and if it is expected behaviour, I'll document it.

@pjonsson
Copy link
Contributor Author

I searched a bit and ONNX had a similar issue where they casted a negative float number to an unsigned integer, and cftime has a similar issue where they are casting NaNs/infs: Unidata/cftime#328.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants