cubed
cubed copied to clipboard
Consider using ndindex for canonicalizing indexes
The logic in index for manipulating an index selection is fairly complicated, particularly the part that removes any ellipsis. (See #400, #401, #402.)
We could use ndindex to help with this - the following shows how easy it is to remove an ellipsis:
idx = ndindex.ndindex(key)
key = idx.expand(x.shape).raw
The library is well tested with Hypothesis tests, but it would be another (pure Python) dependency.