-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEST: fix medium test comparison #1688
Conversation
Thanks for fixing another float number issue! There are a few more exact comparisons in this test file. Change them all in this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dmarek-flex for fixing this!
I guess another question would be why it started complaining about this now. Like, what changed?
Well part of the test relies on a random number generation, which maybe is why it happens from time to time. Although there seems to be a constant seed used. Over the day I have been getting both passes and fails. I don't know why that would not show up on the github tests though. And then on one of the versions of the test some interpolation is used, which could result in some introduced error I guess. |
c9c1a54
to
6a43c71
Compare
I ended up using a relative tolerance which is equal to single precision epsilon. Other tests would fail if I tried to be very strict with double precision epsilon. In lieu of choosing a relative tolerance for each comparison, I just chose to relax the tolerance. |
@marc-flex It would be helpful if you could checkout this branch yourself and see if any test fails. |
Of course! :) I just checked and all test passed |
Resolved some issues with test that used exact comparisons. The default tolerances in np.isclose are suitable.