Open bendichter opened 6 years ago
@bendichter this I think at least in part a Python 2 vs. 3 issue. In Python 2 range is a list and in 3 its an iterator (i.e., what xrange is in Python2). Because of this it is not uncommon in Py3 that you have to do list(range(...))
.
Yeah that's true
@oruebel would it be reasonable to request that it takes any iterable?
I'd also like NWB objects to accept pandas.Series
objects. Again, I can get it in with np.array(series)
, but it would be more usable if these objects accepted iterators.
in general, broader support for duck typing in pynwb would make the package way more user friendly
Low priority, but this would be a nice little usability improvement.
When I try
I get
I can fix this by wrapping
range
inlist
, but it would be nice ifpynwb
handled this kind of thing.