Skip to content

Commit

Permalink
fixed bug for loading index map
Browse files Browse the repository at this point in the history
  • Loading branch information
Dingel321 committed Jul 18, 2024
1 parent a60c974 commit 37e67e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cryo_sbi/utils/image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ def load_index_map(self, path: str):
path (str): Path to load the index map.
"""
index_map = np.load(path)
assert self.paths == index_map["paths"], "Paths do not match the index map."
assert len(self.paths) == len(index_map["paths"]), "Number of paths do not match the index map."
for path1, path2 in zip(self.paths, index_map["paths"]):
assert path1 == path2, "Paths do not match the index map."
self._path_index = index_map["path_index"]
self._file_index = index_map["file_index"]
self._index_map = True
Expand Down

0 comments on commit 37e67e5

Please sign in to comment.