Skip to content

Commit

Permalink
Merge pull request #46 from hdmf-dev/fix/str_vec_read
Browse files Browse the repository at this point in the history
passively read datasets that are vectors of strings
  • Loading branch information
bendichter committed May 6, 2019
2 parents 3078775 + 4f09857 commit e0d863d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hdmf/backends/hdf5/h5tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ def __read_dataset(self, h5obj, name=None):
kwargs["data"] = scalar
elif ndims == 1:
d = None
if h5obj.dtype.kind == 'O': # read list of strings or list of references
if h5obj.dtype.kind == 'O':
elem1 = h5obj[0]
if isinstance(elem1, (text_type, binary_type)):
d = h5obj[()]
elif isinstance(elem1, RegionReference):
d = h5obj
elif isinstance(elem1, RegionReference): # read list of references
d = H5RegionDataset(h5obj, self)
elif isinstance(elem1, Reference):
d = H5ReferenceDataset(h5obj, self)
Expand Down

0 comments on commit e0d863d

Please sign in to comment.