def safe_max_abs_diff(A, ia, B, ib):
    """Compute np.max(np.abs(A)) possible with empty A"""
    A = A[ia] if np.sum(ia) else 0.0
    B = B[ib] if np.sum(ia) else 0.0
    return np.max(np.abs(B - A))
dataset/ETHPy150Open mne-tools/mne-python/mne/inverse_sparse/mxne_optim.py/safe_max_abs_diff/swapped operands of `-`