Skip to content

RFC: add inspection support for querying the maximum number of supported dimensions #694

Closed
@kgryte

Description

@kgryte

In #640, we proposed adding a unified inspection API namespace, and, in that proposal, we included support for querying array library capabilities.

That RFC includes two capabilities:

  • data_dependent_shapes
  • boolean_indexing

In this RFC, I'd like to propose a third; namely, the ability to query the maximum number of supported dimensions. This RFC is related to #479, where it was requested that the specification provide better guidance regarding the minimum upper bound array rank. During Consortium working group meetings, a minimum upper bound of 4 has been discussed.

As such, different array libraries are likely to support different upper bounds, and downstream libraries should have an ergonomic means for determine what that upper bound is in order to ensure portable code. This RFC proposes that we add another field to the dictionary returned by info.capabilities(): max_rank.

As currently written, #640 requires dictionary values be booleans. This RFC would require that requirement to be relaxed, such that dictionary values may, in general, be any value, but specific dictionary keys must be assigned values of a particular type. In this case, max_rank should have an integer value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    API extensionAdds new functions or objects to the API.AcceptedRFC feature request which has been accepted.RFCRequest for comments. Feature requests and proposed changes.topic: InspectionArray API inspection.

    Type

    No type

    Projects

    Status

    Stage 2

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions