Skip to content

Skip testing negative integer exponents for pow related functions #66

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
Jan 7, 2022

Conversation

honno
Copy link
Member

@honno honno commented Jan 7, 2022

This is an out-of-scope scenario and thus should not be tested. I introduced testing numeric dtypes in #62 but did not think to do this at the time.

@honno honno merged commit 2f9cdbe into data-apis:master Jan 7, 2022
assume(right >= 0)
else:
if dh.is_int_dtype(right.dtype):
assume(xp.all(right >= 0))
Copy link
Member

Choose a reason for hiding this comment

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

I guess if hypothesis doesn't complain then we shouldn't worry about it, but wouldn't this filter a large fraction of examples?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, Hypothesis hasn't complained yet here heh. assume is very useful as otherwise I'd need some mechanism to inject a test-specific strategy, but I'll mull over on if I can figure out a nicer (more performative!) solution here.

@honno honno deleted the pow-skip-neg-exp branch February 8, 2022 10:05
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