Replace obsolete routine compare_arrays with assertClose in MPB unit tests#2547
Replace obsolete routine compare_arrays with assertClose in MPB unit tests#2547stevengj merged 2 commits intoNanoComp:masterfrom
compare_arrays with assertClose in MPB unit tests#2547Conversation
|
How does (Basically, I think Python's |
Lines 20 to 30 in eb8ff3a I suspect the current use of |
|
Inspecting the log of the failing This is perhaps not surprising since However, it is not clear why we need to have both |
The MPB unit tests in
test_mpb.pyare currently usingnumpy.testing.assert_allcloseandcompare_arrays(added in #345). For comparing two arrays, these functions have been replaced withassertClosewhich is used in all the other tests.This PR updates
test_mpb.pyto only useassertClose. This modification should hopefully make this test less flaky (it is currently failing the CI). Also,compare_arraysis removed fromutils.pysince it is not being used anywhere else. Finally, type hints are added toassertCloseand its docstrings are updated.