diff --git a/pycbc/io/hdf.py b/pycbc/io/hdf.py index 15911d545c9..e5d61afe4a1 100644 --- a/pycbc/io/hdf.py +++ b/pycbc/io/hdf.py @@ -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,