Skip to content

Commit f2efddc

Browse files
Removed manual prepending of string lengths as that is handled by the dedicated hashing functions.
1 parent 99713e0 commit f2efddc

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/emsarray/conventions/_base.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,14 +1969,11 @@ def hash_geometry(self, hash: "hashlib._Hash") -> None:
19691969
data_array = self.dataset[geometry_name]
19701970

19711971
# Include the variable name in the digest.
1972-
# Prepend the length of strings to prevent unnoticed overlaps with neighbouring data
1973-
hash_int(hash, len(str(geometry_name)))
19741972
hash_string(hash, str(geometry_name))
19751973

19761974
# Include the dtype of the data array.
19771975
# A float array and an int array mean very different things,
19781976
# but could have identical byte patterns.
1979-
hash_int(hash, len(data_array.encoding['dtype'].name))
19801977
hash_string(hash, data_array.encoding['dtype'].name)
19811978

19821979
# Include the size and shape of the data.

0 commit comments

Comments
 (0)