Skip to content

feat: add max rank to inspection API capabilities #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/array_api_stubs/_draft/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,10 @@ def dtypes(
total=False,
)
Capabilities = TypedDict(
"Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool}
"Capabilities",
{
"boolean indexing": bool,
"data-dependent shapes": bool,
"max rank": Optional[int],
},
)
1 change: 1 addition & 0 deletions src/array_api_stubs/_draft/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def capabilities() -> Capabilities:

- `"boolean indexing"`: boolean indicating whether an array library supports boolean indexing. If a conforming implementation fully supports boolean indexing in compliance with this specification (see :ref:`indexing`), the corresponding dictionary value must be ``True``; otherwise, the value must be ``False``.
- `"data-dependent shapes"`: boolean indicating whether an array library supports data-dependent output shapes. If a conforming implementation fully supports all APIs included in this specification (excluding boolean indexing) which have data-dependent output shapes, as explicitly demarcated throughout the specification, the corresponding dictionary value must be ``True``; otherwise, the value must be ``False``.
- `"max rank"`: maximum number of supported dimensions. If a conforming implementation supports arrays having an arbitrary number of dimensions (potentially infinite), the corresponding dictionary value must be ``None``; otherwise, the value must be a finite integer.

Returns
-------
Expand Down
Loading