assert_quantity_allclose

astropy.tests.helper.assert_quantity_allclose(actual, desired, rtol=1e-07, atol=None, **kwargs)[源代码]

如果两个对象不符合所需的公差,则引发断言。

这是一个 Quantity -aware版本 numpy.testing.assert_allclose() .