Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading