Don't test values that are on/near the boundary of an array's dtype #226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should prevent Hypothesis testing boundary numbers that are unrepresentable for libraries like JAX @jakevdp @rgommers. There might be a performance gain but not sure—we know vectorisation would be the biggest win anywho.
I'll sleep on it but I think its probably fine to just get this in, and a TODO would be to make this optional behaviour and/or check the library we're testing on runtime.
Just to say, this is achieved by setting the min/max value arguments in Hypothesis strategies. Historically there were issue where setting boundaries caused undesirable example generation (HypothesisWorks/hypothesis#2907), but that should be all sorted 🤔
Relevant discussion from #206 (review)
and