Array objects of arbitrary rank are infeasible - require a reasonable range of ranks instead
See original GitHub issuehttps://github.com/data-apis/array-api/blob/main/spec/API_specification/array_object.rst#17 says:
Furthermore, a conforming implementation of the array API standard must support array objects of arbitrary rank
N
(i.e., number of dimensions), whereN
is greater than or equal to zero.
Unfortunately this is infeasible: on any computer there’s going to be a finite maximum dimensionality, and in practice it’s usually much smaller - e.g. numpy.array_api
is limited to 32-dimensional arrays. When it’s impossible to comply with the standard, implementations will quite reasonably choose whatever noncompliant option makes sense for them.
I’d therefore propose that this should instead require implementations to support arrays with between zero and 32 dimensions inclusive (or another reasonable constant TBD), and permit implementations to support a larger number of dimensions if they wish.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:18 (14 by maintainers)
Top GitHub Comments
IIRC we explicitly mentioned “zero” out of the potential concern that 0D arrays are excluded in certain array libraries. We should just spell it out?
Still not arbitrarily large! (I’m impressed that it handles rank-1000 though 🤯)