Skip to content

Commit

Permalink
Fix numpy scalar edge case bug (gwastro#4879)
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies authored and prayush committed Nov 21, 2024
1 parent 3b694bc commit 4dad57d
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 4dad57d

Please sign in to comment.