hyperspy.misc.test_utils module
- hyperspy.misc.test_utils.assert_deep_almost_equal(actual, expected, *args, **kwargs)
Assert that two complex structures have almost equal contents. Compares lists, dicts and tuples recursively. Checks numeric values using
numpy.testing.assert_allclose()
and checks all other values withnumpy.testing.assert_equal()
. Accepts additional positional and keyword arguments and pass those intact to assert_allclose() (that’s how you specify comparison precision).- Parameters
*args – Arguments are passed to
numpy.testing.assert_allclose()
orassert_deep_almost_equal()
.**kwargs – Keyword arguments are passed to
numpy.testing.assert_allclose()
orassert_deep_almost_equal()
.