Skip to content
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

Add preliminary support for the draft 2024.12 version of the standard #82

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

asmeurer
Copy link
Member

@asmeurer asmeurer commented Nov 5, 2024

No description provided.

@asmeurer asmeurer requested a review from Copilot November 5, 2024 21:25
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 10 changed files in this pull request and generated 1 suggestion.

Files not reviewed (5)
  • array_api_strict/_typing.py: Evaluated as low risk
  • array_api_strict/init.py: Evaluated as low risk
  • array_api_strict/tests/test_array_object.py: Evaluated as low risk
  • array_api_strict/tests/test_elementwise_functions.py: Evaluated as low risk
  • array_api_strict/_elementwise_functions.py: Evaluated as low risk

@@ -25,3 +26,14 @@ def take(x: Array, indices: Array, /, *, axis: Optional[int] = None) -> Array:
if x.device != indices.device:
raise ValueError(f"Arrays from two different devices ({x.device} and {indices.device}) can not be combined.")
return Array._new(np.take(x._array, indices._array, axis=axis), device=x.device)

@requires_api_version('2024.12')
def take_along_axis(x: Array, indices: Array, /, *, axis: int = -1) -> Array:
Copy link
Preview

Copilot AI Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function take_along_axis should check that indices.dtype is in _integer_dtypes to ensure only integer indices are allowed.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant