r"""Minimise Augmented Lagrangian with respect to
        :math:`\mathbf{y}`.
176596
def ystep(self):
        
        """

        self.Y = np.asarray(sp.proj_l1(self.AX + self.U, self.gamma, axis=0),
                            dtype=self.dtype)
        super(BPDNProjL1, self).ystep()
747232
def _deriv_hypot(x, y):
    """"""
    r = np.hypot(x, y)
    df_dx = x / r
    df_dy = y / r
    return np.hstack([df_dx, df_dy])
770552
def ystep(self):
        
        """

        self.Y = self.Pcn(self.AX + self.U)
526909
def _JRAxiIntegrand(r,E,L,pot):
    """"""
    return nu.sqrt(2.*(E-potentialAxi(r,pot))-L**2./r**2.)
212602
def xstep(self):
        
        """

        self.YU[:] = self.Y - self.U

        b = self.DSf + self.rho*sl.rfftn(self.YU, None, self.cri.axisN)
        if self.cri.Cd == 1:
            self.Xf[:] = sl.solvedbi_sm(self.Df, self.mu + self.rho,
                                        b, self.c, self.cri.axisM)
        else:
            self.Xf[:] = sl.solvemdbi_ism(self.Df, self.mu + self.rho, b,
                                          self.cri.axisM, self.cri.axisC)

        self.X = sl.irfftn(self.Xf, self.cri.Nv, self.cri.axisN)

        if self.opt['LinSolveCheck']:
            Dop = lambda x: sl.inner(self.Df, x, axis=self.cri.axisM)
            if self.cri.Cd == 1:
                DHop = lambda x: np.conj(self.Df) * x
            else:
                DHop = lambda x: sl.inner(np.conj(self.Df), x,
                                          axis=self.cri.axisC)
            ax = DHop(Dop(self.Xf)) + (self.mu + self.rho)*self.Xf
            self.xrrs = sl.rrs(ax, b)
        else:
            self.xrrs = None
123375
def rsdl_s(self, Yprev, Y):
        """"""

        # Since s = rho A^T B (y^(k+1) - y^(k)) and B = -(I I I ...)^T,
        # the correct calculation here would involve replicating (Yprev - Y)
        # on the axis on which the blocks of X are stacked. Since this would
        # require allocating additional memory, and since it is only the norm
        # of s that is required, instead of replicating the vector it is
        # scaled to have the same l2 norm as the replicated vector
        return np.sqrt(self.Nb) * self.rho * (Yprev - Y)
493127
def ystep(self):
        """

        self.Y = sp.prox_l1(self.AX + self.U,
                            (self.lmbda / self.rho) * self.wl1)
        super(ConvBPDN, self).ystep()
772515
function min( x, y ) {
	x = abs( x );
	y = abs( y );
	return ( x > y ) ? y : x;
}
656195
def prox_yline(y, step):
    """"""
    if not np.isscalar(y):
        y= y[0]
    if y > -0.75:
        return np.array([-0.75])
    else:
        return np.array([y])
675246
def lessgreater(x, y):
    
    x = BigFloat._implicit_convert(x)
    y = BigFloat._implicit_convert(y)
    return mpfr.mpfr_lessgreater_p(x, y)
1091898
def Y_tighter(self):
        """"""
        self.parent.value('y_distance', self.parent.value('y_distance') / 1.4)
        self.parent.traces.display()
452277
def tensor_jacobian_product(fun, argnum=0):
    """"""
    def vector_dot_fun(*args, **kwargs):
        args, vector = args[:-1], args[-1]
        return np.tensordot(vector, fun(*args, **kwargs), axes=np.ndim(vector))
    return jacobian(vector_dot_fun, argnum)
1048977
def cart2spher(x, y, z):
    """"""
    hxy = np.hypot(x, y)
    r = np.hypot(hxy, z)
    theta = np.arctan2(z, hxy)
    phi = np.arctan2(y, x)
    return r, theta, phi
363199
def obfn_g(self, Y):
        
        """

        return self.obfn_g0(self.obfn_g0var()) + \
            self.obfn_g1(self.obfn_g1var())
434713
def optimize(self, x0, target):
        """"""
        x = x0
        for i in range(self.maxiter):
            g = self.g(x, target)
            h = self.h(x, target)
            if i == 0:
                alpha = 0
                m = g
            else:
                alpha = - np.dot(m, np.dot(h, g)) / np.dot(m, np.dot(h, m))
                m = g + np.dot(alpha, m)
            t = - np.dot(m, g) / np.dot(m, np.dot(h, m))
            delta = np.dot(t, m)
            x = x + delta
            if np.linalg.norm(delta) < self.tol:
                break
        return x
1131953
def ystep(self):
        
        """

        self.Y[..., 0:-1] = sp.prox_l2(
            self.AX[..., 0:-1] + self.U[..., 0:-1],
            (self.lmbda/self.rho)*self.Wtvna, axis=self.saxes)
        self.Y[..., -1] = sp.prox_l1(
            self.AX[..., -1] + self.U[..., -1] - self.S,
            (1.0/self.rho)*self.Wdf)
888741
def newton_update(x, a, c, step=1.0):
    
    return x - step*np.linalg.inv(hessian(x, a)).dot(gradient(x, a, c))