def where_not_allclose(a, b, rtol=1e-05, atol=1e-08):
 if (not np.all(np.isfinite(a))):
  a = np.ma.fix_invalid(a).data
 if (not np.all(np.isfinite(b))):
  b = np.ma.fix_invalid(b).data
 if ((atol == 0.0) and (rtol == 0.0)):
  return np.where((a != b))
 return np.where((np.abs((a - b)) > (atol + (rtol * np.abs(b)))))

def where_not_allclose ( a , b , rtol = 1e-05 , atol = 1e-08 ) : if ( not np . all ( np . isfinite ( a ) ) ) : a = np . ma . fix_invalid ( a ) . data if ( not np . all ( np . isfinite ( b ) ) ) : b = np . ma . fix_invalid ( b ) . data if ( ( atol == 0.0 ) and ( rtol == 0.0 ) ) : return np . where ( ( a != b ) ) return np . where ( ( np . abs ( ( a - b ) ) > ( atol + ( rtol * np . abs ( b ) ) ) ) )
a version of numpy .