Skip to content

Commit b3c21c3

Browse files
committed
[h5dataset] change string conversion to work with more than 1d
1 parent b139dec commit b3c21c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nixio/hdf5/h5dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def read_data(self, slc=None):
6161
# Let's change it to IndexError
6262
raise IndexError(te_exc)
6363
if data.dtype == util.vlen_str_dtype:
64-
data = np.array([ensure_str(s) for s in data], dtype=util.vlen_str_dtype)
64+
data = np.reshape(np.array(list(map(ensure_str, data.ravel()))), data.shape)
6565
elif data.dtype.fields:
6666
data = self._convert_string_cols(data)
6767
return data

0 commit comments

Comments
 (0)