This commit is contained in:
Ross
2021-11-21 23:27:57 +00:00
parent 7c138d6591
commit 43f37b82c6
+6 -1
View File
@@ -468,8 +468,13 @@ class RapidImage(models.Model):
#hash = hashlib.md5(pre_join.encode()).hexdigest()
#----
md5 = hashlib.md5()
first = True
for i in dataset.pixel_array.astype(str).flatten():
md5.update(f"{i},".encode())
if first:
first=False
md5.update(f"{i}".encode())
else:
md5.update(f",{i}".encode())
print(0)
hash = md5.hexdigest()