def _unit_quat_constraint(x):
    """Constrain our 3 quaternion rot params (ignoring w) to have norm <= 1"""
    return (x * x).sum() - 1
dataset/ETHPy150Open mne-tools/mne-python/mne/chpi.py/_unit_quat_constraint/swapped operands of `-`