Skip to content

Commit b2b71fd

Browse files
authored
Ensure the hash value fits into an unsigned 64-bit integer, avoiding the out-of-bounds casting issue introduced in NumPy 2.0.0 (#805)
1 parent a403eff commit b2b71fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xrspatial/gpu_rtx/mesh_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def create_triangulation(raster, optix):
7-
datahash = np.uint64(hash(str(raster.data.get())))
7+
datahash = np.uint64(hash(str(raster.data.get())) % (1 << 64))
88
optixhash = np.uint64(optix.getHash())
99

1010
# Calculate a scale factor for the height that maintains the ratio

0 commit comments

Comments
 (0)