Skip to content

Commit

Permalink
Fix invalid comparison for non-scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbb committed May 16, 2024
1 parent dbd27db commit 09a8a02
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 @@ -562,7 +562,7 @@ def recursively_load_dict_contents_from_group(h5file:h5py.File, path:str) -> dic
for key, item in h5file[path].items():
if isinstance(item, h5py._hl.dataset.Dataset):
val = item[()]
if val == 'NoneType' or val == b'NoneType':
if isinstance(val, str) and val == 'NoneType' or isinstance(val, bytes) and val == b'NoneType':
ans[key] = None
elif key in ['dims', 'medw', 'sigma_smooth_snmf',
'dxy', 'max_shifts', 'strides', 'overlaps'] and isinstance(val, np.ndarray):
Expand Down

0 comments on commit 09a8a02

Please sign in to comment.