You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In test_solve_sample_methods, ot.solve_sample is called with the same random argument in the two first positions. The expectation is, of course, to find a solution of 0. This is checked withnp.testing.assert_allclose(sol2.value, 0), with sol2 being said solution. Since assert_allclose defaults to an rtol of 1e-7 and an atol of 0, this means that since the desired value is 0, no deviation is allowed (zero tolerance). This test thus checks for exact equality, and can therefore easily fail.
To Reproduce
Steps to reproduce the behavior:
Load attached pot-bug.npy.gz file into variable x. (The attachment is gzip-compressed because apparently GitHub doesn't like the file extension .npy?)
Describe the bug
In
test_solve_sample_methods
,ot.solve_sample
is called with the same random argument in the two first positions. The expectation is, of course, to find a solution of 0. This is checked withnp.testing.assert_allclose(sol2.value, 0)
, withsol2
being said solution. Sinceassert_allclose
defaults to anrtol
of1e-7
and anatol
of 0, this means that since the desired value is 0, no deviation is allowed (zero tolerance). This test thus checks for exact equality, and can therefore easily fail.To Reproduce
Steps to reproduce the behavior:
x
. (The attachment is gzip-compressed because apparently GitHub doesn't like the file extension.npy
?)sol2 = ot.solve_sample(x, x, **{'method': 'gaussian'}))
.np.testing.assert_allclose(sol2.value, 0)
fails.Code sample
See steps to reproduce above.
Expected behavior
The test should use a non-zero
atol
inassert_allclose
to allow for floating point rounding errors.Environment (please complete the following information):
pip3 install --user --break-system-packages .
from source treeOutput of the following code snippet:
The text was updated successfully, but these errors were encountered: