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

PR: Overhaul unit tests to use np.testing.assert_allclose definition. #1231

Merged
merged 8 commits into from
Dec 15, 2023

Conversation

KelSolaar
Copy link
Member

Summary

This PR overhauls the unit tests to use np.testing.assert_allclose definition. We have been suffering hard to reproduce precision loss issues during multi-threaded unit tests and using np.testing.assert_allclose definition helps alleviate it, albeit in a disappointing way. With that said, np.testing.assert_allclose is recommended by Numpy over np.testing.assert_array_almost_equal thus this is a welcome switch.

Preflight

Code Style and Quality

  • Unit tests have been implemented and passed.
  • Pyright static checking has been run and passed.
  • Pre-commit hooks have been run and passed.
  • [N/A] New transformations have been added to the Automatic Colour Conversion Graph.
  • [N/A] New transformations have been exported to the relevant namespaces, e.g. colour, colour.models.

Documentation

  • [N/A] New features are documented along with examples if relevant.
  • [N/A] The documentation is Sphinx and numpydoc compliant.

@KelSolaar KelSolaar added this to the v0.4.4 milestone Dec 13, 2023
@KelSolaar KelSolaar merged commit a23e583 into develop Dec 15, 2023
46 checks passed
@KelSolaar KelSolaar deleted the feature/unit_tests branch December 15, 2023 21:16
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

Successfully merging this pull request may close these issues.

None yet

1 participant