Skip to content

Commit a05c3c3

Browse files
author
sprenger
committed
[openephysio] Fix array_annotations
1 parent 400a12c commit a05c3c3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

neo/rawio/openephysbinaryrawio.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,12 @@ def _parse_header(self):
214214
if k in ('timestamps', ):
215215
continue
216216
if k in d:
217-
ev_ann['__array_annotations__'][k] = d[k]
217+
# split custom dtypes into separate annotations
218+
if d[k].dtype.names:
219+
for name in d[k].dtype.names:
220+
ev_ann['__array_annotations__'][name] = d[k][name].flatten()
221+
else:
222+
ev_ann['__array_annotations__'][k] = d[k]
218223

219224
def _segment_t_start(self, block_index, seg_index):
220225
return self._t_start_segments[block_index][seg_index]

0 commit comments

Comments
 (0)