-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2619 from Zac-HD/dtype-passthrough
- Loading branch information
Showing
5 changed files
with
332 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RELEASE_TYPE: minor | ||
|
||
This release upgrades the :func:`~hypothesis.extra.numpy.from_dtype` strategy | ||
to pass optional ``**kwargs`` to the inferred strategy, and upgrades the | ||
:func:`~hypothesis.extra.numpy.arrays` strategy to accept an ``elements=kwargs`` | ||
dict to pass through to :func:`~hypothesis.extra.numpy.from_dtype`. | ||
|
||
``arrays(floating_dtypes(), shape, elements={"min_value": -10, "max_value": 10})`` | ||
is a particularly useful pattern, as it allows for any floating dtype without | ||
triggering the roundoff warning for smaller types or sacrificing variety for | ||
larger types (:issue:`2552`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.