Skip to content

Commit 6721b8f

Browse files
committed
[string handling] make sure that str data is not converted to np.str_
... hopefully solves issue 534
1 parent 1ea15e4 commit 6721b8f

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.reshape(np.array(list(map(ensure_str, data.ravel()))), data.shape)
64+
data = np.reshape(np.array(list(map(ensure_str, data.ravel())), dtype=object), data.shape)
6565
elif data.dtype.fields:
6666
data = self._convert_string_cols(data)
6767
return data

0 commit comments

Comments
 (0)