def _compute_residual(proj_op, B_orig, fwd_orig, Q):
    # apply the projector to both elements
    return np.dot(proj_op, B_orig) - np.dot(np.dot(Q, fwd_orig), proj_op.T)
Compute the residual
dataset/ETHPy150Open mne-tools/mne-python/mne/dipole.py/_compute_residual