BIDS / datarray

Prototyping numpy arrays with named axes for data management.
http://bids.github.com/datarray
Other
87 stars 20 forks source link

Cannot create datarray with ticks but no labels #7

Open kwgoodman opened 14 years ago

kwgoodman commented 14 years ago

I'd like to use ticks without labels. At the moment that is not possible:

>>> DataArray([1, 2], [(None, ('a', 'b'))])
<snip>
ValueError: ticks only supported when Axis has a label

Well, it is possible:

>>> dar = DataArray([1, 2], [('tmp', ('a', 'b'))])
>>> dar.set_label(0, None)
>>> dar.axes
(Axis(label=None, index=0, ticks=('a', 'b')),)    
terhorst commented 13 years ago

I am not sure why this throws an exception, does anyone? The tests all pass if we remove this restriction.