Skip to content

Commit

Permalink
Fix corr image not validating if it contains nans
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbb committed Aug 9, 2024
1 parent cd61a86 commit 58d01dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caiman/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def recursively_save_dict_contents_to_group(h5file:h5py.File, path:str, dic:dict
except:
item = np.array(item).astype('|S32')
h5file[path + key] = item
if not np.array_equal(h5file[path + key][()], item):
if not np.array_equal(h5file[path + key][()], item, equal_nan=item.dtype == 'f'): # just using True gives "ufunc 'isnan' not supported for the input types"
raise ValueError(f'Error while saving ndarray {key} of dtype {item.dtype}')
# save dictionaries
elif isinstance(item, dict):
Expand Down

0 comments on commit 58d01dd

Please sign in to comment.