Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: array_api.Array has wrong type hints in __getitem__ #24982

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

Closed
Illviljan opened this issue Oct 22, 2023 · 1 comment · Fixed by #25022
Closed

BUG: array_api.Array has wrong type hints in __getitem__ #24982

Illviljan opened this issue Oct 22, 2023 · 1 comment · Fixed by #25022

Comments

@Illviljan
Copy link
Contributor

Illviljan commented Oct 22, 2023

Describe the issue:

The __getitem__ is missing a None in the tuple:

def __getitem__(
self: Array,
key: Union[
int, slice, ellipsis, Tuple[Union[int, slice, ellipsis], ...], Array
],
/,
) -> Array:

Probably should look like:
https://github.com/data-apis/array-api/blob/e2b373dd497a1e49b43529e66d1196e504c673cd/src/array_api_stubs/_draft/array_object.py#L502-L506

References:
https://data-apis.org/array-api/latest/API_specification/generated/array_api.array.__getitem__.html
https://data-apis.org/array-api/latest/API_specification/indexing.html

Runtime information:

Seen in main.

@shubhalgupta
Copy link
Contributor

is this issue still open @Illviljan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants