コード例 #1
0
ファイル: utils.py プロジェクト: flyeagle0/scprep
def assert_all_close(X, Y, rtol=1e-05, atol=1e-08):
    """Assert all values of two matrices are similar.

    Parameters
    ----------
    rtol : relative (multiplicative) tolerance of error
    atol : absolute (additive) tolerance of error
    """
    X = toarray(X)
    Y = toarray(Y)
    np.testing.assert_allclose(X, Y, rtol=rtol, atol=atol)
コード例 #2
0
ファイル: utils.py プロジェクト: flyeagle0/scprep
def assert_all_equal(X, Y):
    """Assert all values of two matrices are the same."""
    X = toarray(X)
    Y = toarray(Y)
    np.testing.assert_array_equal(X, Y)