def _check_with_col_sign_flipping(A, B, tol=<NUM_LIT:0.0>):
sign = True<EOL>for column_idx in range(A.shape[<NUM_LIT:1>]):<EOL><INDENT>sign = sign and ((((A[:, column_idx] -<EOL>B[:, column_idx]) ** <NUM_LIT:2>).mean() <= tol ** <NUM_LIT:2>) or<EOL>(((A[:, column_idx] +<EOL>B[:, column_idx]) ** <NUM_LIT:2>).mean() <= tol ** <NUM_LIT:2>))<EOL>if not sign:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Check array A and B are equal with possible sign flipping on
    each columns