Skip to content

RFC: require [()] to be a no-op for all ranks? #833

Open
@lucascolley

Description

@lucascolley

The standard says:

Providing an empty tuple or an ellipsis to an array of rank 0 must result in an array of the same rank (i.e., if A has rank 0, A == A[()] and A == A[...])

Why is this restricted to rank 0? Sure, a reason for the inclusion is probably to be explicit about the divergence from NumPy, but am I missing something about rank 0 being special from the standard's perspective? Since [()] must act like [...] in the 0D case, should it not always act like that, for consistency?

Metadata

Metadata

Assignees

No one assigned

    Labels

    API changeChanges to existing functions or objects in the API.Needs DiscussionNeeds further discussion.RFCRequest for comments. Feature requests and proposed changes.topic: IndexingArray indexing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions