Skip to content

Don't ignore exceptions in elementwise reference implementations #293

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

Conversation

asmeurer
Copy link
Member

For some reason, "except OverflowError" was changed to "except Exception" in e72184e. For now I have removed the except entirely, but it's possible we may need to keep the handling for OverflowError.

There are several issues with tests that this was masking, which I have not fixed yet. Quite a few tests are not testing the complex implementations correctly because they are using math instead of cmath, for example. See also data-apis/array-api-compat#183.

For some reason, "except OverflowError" was changed to "except Exception" in
e72184e. For now I have removed the except entirely, but it's possible we may
need to keep the handling for OverflowError.

There are several issues with tests that this was masking, which I have not
fixed yet. Quite a few tests are not testing the complex implementations
correctly because they are using math instead of cmath, for example. See also
data-apis/array-api-compat#183.
Some of these still have some issues that need to be addressed, like
overflows.
…mplementations

Other exceptions should still be raised, but this is a common occurance which
just means that the math library raises OverflowError in many instances
instead of giving inf or nan.
@asmeurer asmeurer merged commit 4b36767 into data-apis:master Oct 21, 2024
4 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.

1 participant