From 40f0cbceeea676d43f4378a32813e3eb5fe9285c Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Thu, 5 Mar 2026 11:36:01 +0100 Subject: [PATCH] Fix round_and_hash_float_array Fixes #2530 --- tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 62420a6383..3213abd318 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -143,7 +143,7 @@ def round_and_hash_float_array(arr, decimals=6): # Adapted from https://cs.stackexchange.com/a/37965 h = 1 - for f in arr: + for f in arr.flat: # Mimic Float.floatToIntBits: converts float to 4-byte binary, then interprets as int float_as_int = struct.unpack("!i", struct.pack("!f", f))[0] h = 31 * h + float_as_int