def equality_constraints(vects, *args):
    """
    Spherical equality constraint. Returns 0 if vects lies on the unit 
    sphere.
    
    Parameters
    ----------
    vects : array-like shape (N * 3)
    
    Returns
    -------
    array shape (N,) : Difference between squared vector norms and 1.
    """
    N = vects.shape[0] // 3
    vects = vects.reshape((N, 3))
    return (vects ** 2).sum(1) - 1.0