Skip to content

Skip testing negative integer exponents for pow related functions - #66

Merged
honno merged 1 commit into
data-apis:masterfrom
honno:pow-skip-neg-exp
Jan 7, 2022
Merged

honno merged 1 commit into
data-apis:masterfrom
honno:pow-skip-neg-exp

Conversation

@honno

@honno honno commented Jan 7, 2022 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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