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
Here and elsewhere, the pattern self.assertTrue(np.isclose(SOME_FLOAT, 3.14159265359)) can be replaced with the simpler self.assertAlmostEqual(SOME_FLOAT, 3.14159265359). This makes the intent easier to see and avoids the numpy import (at least in the linked reference, np is only used to access isclose.)
The text was updated successfully, but these errors were encountered:
liamhuber
changed the title
There's a test for that: AlmostEqual
Nit: There's a test for that: AlmostEqual
Sep 11, 2023
liamhuber
changed the title
Nit: There's a test for that: AlmostEqual
[nit] There's a test for that: AlmostEqual
Sep 11, 2023
Here and elsewhere, the pattern
self.assertTrue(np.isclose(SOME_FLOAT, 3.14159265359))
can be replaced with the simplerself.assertAlmostEqual(SOME_FLOAT, 3.14159265359)
. This makes the intent easier to see and avoids the numpy import (at least in the linked reference,np
is only used to accessisclose
.)The text was updated successfully, but these errors were encountered: