Closed stroxler closed 12 years ago
First step is done in commit 49ff728d47: refactor the larry.getitem unit tests. Next step would be to add unit tests for bool 1d larry indexing.
I did a quick fix to add this feature. Give it a try to make sure it behaves as you expect.
Looks great to me!
At least for 1d larrys, it makes sense to allow users to get a subset using a larry for indexing. I believe this functionality actually exists already for setting items. So if larry is 1d, the following could be legal:
At the moment, this will crash; instead you have to do
We could be very strict about this and only allow 1d larrys where the indexing larry is a perfect match in terms of labels. If we were ambitious we could flatten higher-d larrys (that's what numpy does), but dealing with the labels could make that too confusing to justify the convenience.