Skip to content

Consider using ndindex for canonicalizing indexes #403

Closed
@tomwhite

Description

@tomwhite

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions