Skip to content

Commit

Permalink
convert compound dtype to list on read
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Sep 4, 2024
1 parent 1abb8ec commit 21127c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hdmf/backends/hdf5/h5tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,10 @@ def __read_dataset(self, h5obj, name=None):
kwargs['dtype'] = d.dtype
elif h5obj.dtype.kind == 'V': # scalar compound data type
kwargs['data'] = np.array(scalar, dtype=h5obj.dtype)
cpd_dt = h5obj.dtype
ref_cols = [check_dtype(ref=cpd_dt[i]) or check_dtype(vlen=cpd_dt[i]) for i in range(len(cpd_dt))]
d = BuilderH5TableDataset(h5obj, self, ref_cols)
kwargs['dtype'] = HDF5IO.__compound_dtype_to_list(h5obj.dtype, d.dtype)
else:
kwargs["data"] = scalar
else:
Expand Down

0 comments on commit 21127c4

Please sign in to comment.