Open JuliaSprenger opened 7 years ago
A simple workaround to avoid this problem would be to save only spiketrains, for which the left_sweep attributes contain data like [-2.0]*pq.s
.
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.