From 2d65b8dd80898241605da02588ed8be17ef87224 Mon Sep 17 00:00:00 2001 From: brendancol Date: Fri, 13 Sep 2024 15:48:43 -0400 Subject: [PATCH] Ensure the hash value fits into an unsigned 64-bit integer, avoiding the out-of-bounds casting issue introduced in NumPy 2.0.0 --- xrspatial/gpu_rtx/mesh_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xrspatial/gpu_rtx/mesh_utils.py b/xrspatial/gpu_rtx/mesh_utils.py index 9e6286de..86bfbbb6 100644 --- a/xrspatial/gpu_rtx/mesh_utils.py +++ b/xrspatial/gpu_rtx/mesh_utils.py @@ -4,7 +4,7 @@ def create_triangulation(raster, optix): - datahash = np.uint64(hash(str(raster.data.get()))) + datahash = np.uint64(hash(str(raster.data.get())) % (1 << 64)) optixhash = np.uint64(optix.getHash()) # Calculate a scale factor for the height that maintains the ratio