Skip to content

ENH: prohibit astype(complex, not complex) #101

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
Dec 4, 2024

Conversation

ev-br
Copy link
Member

@ev-br ev-br commented Nov 26, 2024

as discussed in data-apis/array-api-tests#311 :

the spec stipulates that (https://data-apis.org/array-api/latest/API_specification/generated/array_api.astype.html#astype)

Casting a complex floating-point array to a real-valued data type should not be permitted.

Thus error out here and avoid testing astype(complex, not complex) it in -tests.

@ev-br
Copy link
Member Author

ev-br commented Dec 4, 2024

Merging as approved.

@ev-br ev-br merged commit 94febbc into data-apis:main Dec 4, 2024
21 checks passed
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.

2 participants