-
Notifications
You must be signed in to change notification settings - Fork 575
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 #2049 from Zac-HD/array-warning
Detect and warn on float truncation in arrays
- Loading branch information
Showing
5 changed files
with
89 additions
and
36 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 makes :func:`~hypothesis.extra.numpy.arrays` more pedantic about | ||
``elements`` strategies that cannot be exactly represented as array elements. | ||
|
||
In practice, you will see new warnings if you were using a ``float16`` or | ||
``float32`` dtype without passing :func:`~hypothesis.strategies.floats` the | ||
``width=16`` or ``width=32`` arguments respectively. | ||
|
||
The previous behaviour could lead to silent truncation, and thus some elements | ||
being equal to an explicitly excluded bound (:issue:`1899`). |
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
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