colour-science / colour

Colour Science for Python
https://www.colour-science.org
BSD 3-Clause "New" or "Revised" License
2.14k stars 263 forks source link

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

Closed KelSolaar closed 11 months ago

KelSolaar commented 11 months ago

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

Documentation