Skip to content

Commit dad968d

Browse files
author
sprenger
committed
temporary fix for array_annotation checks
1 parent 2e17b47 commit dad968d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

neo/io/proxyobjects.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ def __init__(self, array_annotations=None, **annotations):
3434
annotations['file_origin'] = str(self._rawio.source_name())
3535

3636
# clean annotations that are not 1D
37-
# TODO change array_annotations handling to avoid that
38-
array_annotations = {k: v for k, v in array_annotations.items() if v.ndim==1}
37+
# TODO remove this once multi-dimensional array_annotations are possible
38+
array_annotations = {k: v for k, v in array_annotations.items()
39+
if (not hasattr(v, 'ndim') or v.ndim == 1)}
3940

4041
# this mock the array annotaions to avoid inherits DataObject
4142
self.array_annotations = ArrayDict(self.shape[-1])

0 commit comments

Comments
 (0)