def allclose(x, y, rtol=1e-05, atol=1e-08):
 for (xi, yi) in zip(x, y):
  if (not (abs((xi - yi)) <= (atol + (rtol * abs(yi))))):
   return False
 return True

def allclose ( x , y , rtol = 1e-05 , atol = 1e-08 ) : for ( xi , yi ) in zip ( x , y ) : if ( not ( abs ( ( xi - yi ) ) <= ( atol + ( rtol * abs ( yi ) ) ) ) ) : return False return True
returns true if x and y are sufficiently close .