def obfn_cns(self):
        r"""Compute constraint violation measure :math:`\| P(\mathbf{y})
        - \mathbf{y}\|_2`.
        """

        Y = self.obfn_gvar()
        return np.linalg.norm((self.Pcn(Y) - Y))
def obfn_cns ( self ) : Y = self . obfn_gvar ( ) return np . linalg . norm ( ( self . Pcn ( Y ) - Y ) )
r"""Compute constraint violation measure :math:`\| P(\mathbf{y})
        - \mathbf{y}\|_2`.