You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...]
File "python-neo/neo/io/nixio.py", line 741, in write_spiketrain
self._write_object(sptr, loc)
File "python-neo/neo/io/nixio.py", line 555, in _write_object
self._write_data(nixobj, attr, objpath)
File "python-neo/neo/io/nixio.py", line 964, in _write_data
attr["left_sweep"])
File "python-neo/neo/io/nixio.py", line 1076, in _write_property
for item in v:
TypeError: iteration over a 0-d array
The underlying problem is that a scalar quantity object like -2.0*pq.s is evaluated as being an Iterable, but actually can not be iterated.
I think this case should needs to be explicitly checked somewhere within the nixio.
The text was updated successfully, but these errors were encountered:
I should add a special case for 0d/scalar quantities. The _write_property() method needs to make some assumptions about the structure of properties based on their type and for now one of the assumptions is that Quantity types are iterable. Of course this isn't true when it's a 0d array, so we should check for that.
On the 'nixio-object-names' branch, when trying to save a spiketrain like this one
this results in a TypeError
The underlying problem is that a scalar quantity object like
-2.0*pq.s
is evaluated as being an Iterable, but actually can not be iterated.I think this case should needs to be explicitly checked somewhere within the nixio.
The text was updated successfully, but these errors were encountered: