You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of June 16, numpy 2.0.0 was released with breaking changes regarding the handling of out of bounds values when casting. This breaks the below line since python's native hash function can output out of bound values:
2024-06-18T22:51:25.961Z File "/usr/local/lib/python3.10/dist-packages/xrspatial/viewshed.py", line 1663, in viewshed
2024-06-18T22:51:25.961Z return viewshed_gpu(raster, x, y, observer_elev, target_elev)
2024-06-18T22:51:25.961Z File "/usr/local/lib/python3.10/dist-packages/xrspatial/gpu_rtx/viewshed.py", line 280, in viewshed_gpu
2024-06-18T22:51:25.961Z scale = create_triangulation(raster, optix)
2024-06-18T22:51:25.961Z File "/usr/local/lib/python3.10/dist-packages/xrspatial/gpu_rtx/mesh_utils.py", line 7, in create_triangulation
2024-06-18T22:51:25.961Z datahash = np.uint64(hash(str(raster.data.get())))
2024-06-18T22:51:25.961Z OverflowError: Python integer -2413162623232959393 out of bounds for uint64
The easy workaround for now is to pin the local numpy version to 1.26.4, but it might be a good idea to a) add this to readme/dependencies for now, and/or b) move to a better hash function that does not result in negative numbers.
The text was updated successfully, but these errors were encountered:
As of June 16, numpy 2.0.0 was released with breaking changes regarding the handling of out of bounds values when casting. This breaks the below line since python's native hash function can output out of bound values:
xarray-spatial/xrspatial/gpu_rtx/mesh_utils.py
Line 7 in 555706c
The easy workaround for now is to pin the local numpy version to 1.26.4, but it might be a good idea to a) add this to readme/dependencies for now, and/or b) move to a better hash function that does not result in negative numbers.
The text was updated successfully, but these errors were encountered: