Exemplo n.º 1
0
def assert_allclose(actual, desired, rtol=1.e-5, atol=1.e-8,
                    err_msg=''):
    r"""wrapper for numpy.testing.allclose with default tolerances of
    numpy.allclose. Needed since testing method has different values."""
    if issparse(actual):
        actual = actual.toarray()
    if issparse(desired):
        desired = desired.toarray()
    return assert_allclose_np(actual, desired, rtol=rtol, atol=atol,
                              err_msg=err_msg, verbose=True)
Exemplo n.º 2
0
def assert_allclose(actual,
                    desired,
                    rtol=1.e-5,
                    atol=1.e-8,
                    err_msg='',
                    verbose=True):
    r"""wrapper for numpy.testing.allclose with default tolerances of
    numpy.allclose. Needed since testing method has different values."""
    return assert_allclose_np(actual,
                              desired,
                              rtol=rtol,
                              atol=atol,
                              err_msg=err_msg,
                              verbose=True)
Exemplo n.º 3
0
def assert_allclose(actual, desired, rtol=1.e-5, atol=1.e-8,
                    err_msg='', verbose=True):
    r"""wrapper for numpy.testing.allclose with default tolerances of
    numpy.allclose. Needed since testing method has different values."""
    return assert_allclose_np(actual, desired, rtol=rtol, atol=atol,
                              err_msg=err_msg, verbose=True)