BIDS / datarray

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

Basic implementation of DataArray.axes #51

Closed terhorst closed 13 years ago

terhorst commented 13 years ago

Added a new class AxesManager and a chunk of doctests to reflect the API discussed in the summit proposal. There is one case that isn't currently supported, that is passing a mixture of ints and labels to .axes(), for example

>>> A.axes(1, 'date')

I think it's potentially confusing that you have, essentially,

>>> A.axes(1) is A.axes[1]
True

For me the separation of []-is-for-ints and ()-is-for-strings is cleaner. I'm curious, what was the use case that made everyone decide this should go in? At any rate, I'll work on implementing this for the next pull.

All doctests and almost all unit tests are passing. Will also aim for 100% on the next pull.

terhorst commented 13 years ago

See e60a615a02347bd for amended patch