def assert_almost_equal(left, right, check_exact=False, check_dtype='equiv', check_less_precise=False, **kwargs):
 if isinstance(left, pd.Index):
  return assert_index_equal(left, right, check_exact=check_exact, exact=check_dtype, check_less_precise=check_less_precise, **kwargs)
 elif isinstance(left, pd.Series):
  return assert_series_equal(left, right, check_exact=check_exact, check_dtype=check_dtype, check_less_precise=check_less_precise, **kwargs)
 elif isinstance(left, pd.DataFrame):
  return assert_frame_equal(left, right, check_exact=check_exact, check_dtype=check_dtype, check_less_precise=check_less_precise, **kwargs)
 else:
  if check_dtype:
   if (is_number(left) and is_number(right)):
    pass
   elif (is_bool(left) and is_bool(right)):
    pass
   else:
    if (isinstance(left, np.ndarray) or isinstance(right, np.ndarray)):
     obj = 'numpy array'
    else:
     obj = 'Input'
    assert_class_equal(left, right, obj=obj)
  return _testing.assert_almost_equal(left, right, check_dtype=check_dtype, check_less_precise=check_less_precise, **kwargs)

def assert_almost_equal ( left , right , check_exact = False , check_dtype = 'equiv' , check_less_precise = False , ** kwargs ) : if isinstance ( left , pd . Index ) : return assert_index_equal ( left , right , check_exact = check_exact , exact = check_dtype , check_less_precise = check_less_precise , ** kwargs ) elif isinstance ( left , pd . Series ) : return assert_series_equal ( left , right , check_exact = check_exact , check_dtype = check_dtype , check_less_precise = check_less_precise , ** kwargs ) elif isinstance ( left , pd . DataFrame ) : return assert_frame_equal ( left , right , check_exact = check_exact , check_dtype = check_dtype , check_less_precise = check_less_precise , ** kwargs ) else : if check_dtype : if ( is_number ( left ) and is_number ( right ) ) : pass elif ( is_bool ( left ) and is_bool ( right ) ) : pass else : if ( isinstance ( left , np . ndarray ) or isinstance ( right , np . ndarray ) ) : obj = 'numpy array' else : obj = 'Input' assert_class_equal ( left , right , obj = obj ) return _testing . assert_almost_equal ( left , right , check_dtype = check_dtype , check_less_precise = check_less_precise , ** kwargs )
fail if the two objects are unequal after rounded to given places .