master
/ miniconda3 / envs / poem / lib / python3.10 / site-packages / sympy / testing / matrices.py

matrices.py @a8e0244

41a0142
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
def allclose(A, B, rtol=1e-05, atol=1e-08):
    if len(A) != len(B):
        return False

    for x, y in zip(A, B):
        if abs(x-y) > atol + rtol * max(abs(x), abs(y)):
            return False
    return True