You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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
|