-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix #3593 - approx method in a single element of numpy array
If the user pass as a expected value a numpy array created like numpy.array(5); it will creates an array with one element without shape, when used with approx it will raise an error 'TypeError: iteration over a 0-d array'
- Loading branch information
1 parent
42b3125
commit 0030ceb
Showing
4 changed files
with
28 additions
and
5 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
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,5 @@ | ||
If the user pass as a expected value a numpy array created like | ||
numpy.array(5); it will creates an array with one element without shape, | ||
when used with approx it will raise an error for the `repr` | ||
'TypeError: iteration over a 0-d array'. With this PR pytest will iterate | ||
properly in the numpy array even with 0 dimension. |
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