Skip to content
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

[nit] There's a test for that: AlmostEqual #28

Closed
liamhuber opened this issue Sep 11, 2023 · 1 comment
Closed

[nit] There's a test for that: AlmostEqual #28

liamhuber opened this issue Sep 11, 2023 · 1 comment

Comments

@liamhuber
Copy link
Member

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.)

@liamhuber liamhuber changed the title There's a test for that: AlmostEqual Nit: There's a test for that: AlmostEqual Sep 11, 2023
@liamhuber liamhuber changed the title Nit: There's a test for that: AlmostEqual [nit] There's a test for that: AlmostEqual Sep 11, 2023
@jan-janssen
Copy link
Member

This was implemented in #251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants