Skip to content

Commit

Permalink
Fix numpy scalar edge case bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Sep 13, 2024
1 parent 93f2856 commit 06f21f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycbc/io/hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def create_dataset(self, name, shape=None, dtype=None, data=None, **kwds):
"""
Wrapper around h5py's create_dataset so that checksums are used
"""
if hasattr(data, 'dtype') and not data.dtype == object:
if isinstance(data, np.ndarray) and not data.dtype == object:
kwds['fletcher32'] = True
return h5py.Group.create_dataset(
self,
Expand Down

0 comments on commit 06f21f8

Please sign in to comment.