def check_arrays(x, y, err_msg='', verbose=True, check_dtypes=True):
 assert (type(x) == type(y)), '{x} != {y}'.format(x=type(x), y=type(y))
 assert (x.dtype == y.dtype), '{x.dtype} != {y.dtype}'.format(x=x, y=y)
 if isinstance(x, LabelArray):
  assert_array_equal(x.is_missing(), y.is_missing(), err_msg=err_msg, verbose=verbose)
  x = x.as_string_array()
  y = y.as_string_array()
 elif (x.dtype.kind in 'mM'):
  x_isnat = isnat(x)
  y_isnat = isnat(y)
  assert_array_equal(x_isnat, y_isnat, err_msg='NaTs not equal', verbose=verbose)
  x = np.where(x_isnat, np.zeros_like(x), x)
  y = np.where(x_isnat, np.zeros_like(x), x)
 return assert_array_equal(x, y, err_msg=err_msg, verbose=verbose)

def check_arrays ( x , y , err_msg = '' , verbose = True , check_dtypes = True ) : assert ( type ( x ) == type ( y ) ) , '{x} != {y}' . format ( x = type ( x ) , y = type ( y ) ) assert ( x . dtype == y . dtype ) , '{x.dtype} != {y.dtype}' . format ( x = x , y = y ) if isinstance ( x , LabelArray ) : assert_array_equal ( x . is_missing ( ) , y . is_missing ( ) , err_msg = err_msg , verbose = verbose ) x = x . as_string_array ( ) y = y . as_string_array ( ) elif ( x . dtype . kind in 'mM' ) : x_isnat = isnat ( x ) y_isnat = isnat ( y ) assert_array_equal ( x_isnat , y_isnat , err_msg = 'NaTs not equal' , verbose = verbose ) x = np . where ( x_isnat , np . zeros_like ( x ) , x ) y = np . where ( x_isnat , np . zeros_like ( x ) , x ) return assert_array_equal ( x , y , err_msg = err_msg , verbose = verbose )
wrapper around np .