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

[BUG] Tests of ufuncs should ensure values are in the right domain #12352

Open
vyasr opened this issue Dec 9, 2022 · 1 comment
Open

[BUG] Tests of ufuncs should ensure values are in the right domain #12352

vyasr opened this issue Dec 9, 2022 · 1 comment
Labels
0 - Backlog In queue waiting for assignment bug Something isn't working good first issue Good for newcomers tests Unit testing for project

Comments

@vyasr
Copy link
Contributor

vyasr commented Dec 9, 2022

Describe the bug
The test_array_ufunc.py module contains tests that I introduced in #10346 and #10217 that are intended to be generic for all ufuncs in test_ufunc_(index|series|dataframe). However, the inputs are generated in exactly the same way for all ufuncs. This leads to some tests where all inputs are invalid, making some of the tests do nothing other than ensure that invalid inputs produce the same output. Some of the most egregious examples are inverse trigonometric functions arcsin and arccos, for which the domains are limited to (-1, 1) but all inputs are > 1.

Steps/Code to reproduce bug
Run the tests and check warnings.

Expected behavior
The tests should be rewritten to generate inputs within the domain of the functions of choice, with perhaps just a few values outside the domain so that we can continue to validate consistent behavior in both cases. In an ideal world we would also update cudf to throw the same warnings as pandas here, but that may be more work than it's worth since we would almost certainly have to introspect the data.

@vyasr vyasr added bug Something isn't working Needs Triage Need team to review and classify tests Unit testing for project labels Dec 9, 2022
@GregoryKimball GregoryKimball added 0 - Backlog In queue waiting for assignment and removed Needs Triage Need team to review and classify labels Jun 6, 2023
@GregoryKimball
Copy link
Contributor

I believe this is still needed.

@GregoryKimball GregoryKimball added the good first issue Good for newcomers label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog In queue waiting for assignment bug Something isn't working good first issue Good for newcomers tests Unit testing for project
Projects
None yet
Development

No branches or pull requests

2 participants