python-intermediate-development icon indicating copy to clipboard operation
python-intermediate-development copied to clipboard

Use npt.assert_allclose instead of npt.assert_almost_equal

Open p-j-smith opened this issue 3 years ago • 0 comments
trafficstars

In Diagnosing Issues and Improving Robustness, in the test test_patient_normalise, npt.assert_almost_equal is used to compare the actual and expected results. However, it is recommended to instead use npt.assert_allclose. This is because npt.assert_allclose provides more consistent floating point comparisons.

p-j-smith avatar Jan 13 '22 18:01 p-j-smith