unittest/python/crocoddyl/state.py
def Jdiff(self, x1, x2, firstsecond='both'):
        """ Jacobians for the x2 - x1.

        :param x1: current state
        :param x2: next state
        :param firstsecond: desired partial derivative
        :return the partial derivative(s) of the diff(x1,x2) function
        """
        assert (firstsecond in ['first', 'second', 'both'])
        if firstsecond == 'both':
            return [self.Jdiff(x1, x2, 'first'), self.Jdiff(x1, x2, 'second')]

        J = np.zeros([self.ndx, self.ndx])
        if firstsecond == 'first':
            J[:, :] = -np.eye(self.ndx)
        elif firstsecond == 'second':
            J[:, :] = np.eye(self.ndx)
        return J
 Jacobians for the x2 - x1.

        :param x1: current state
        :param x2: next state
        :param firstsecond: desired partial derivative
        :return the partial derivative(s) of the diff(x1,x2) function
        
Jacobians for the x2 - x1.
Jacobians for the x2 - x1 .
def Jdiff(self, x1, x2, firstsecond='both'):
        assert (firstsecond in ['first', 'second', 'both'])
        if firstsecond == 'both':
            return [self.Jdiff(x1, x2, 'first'), self.Jdiff(x1, x2, 'second')]
        J = np.zeros([self.ndx, self.ndx])
        if firstsecond == 'first':
            J[:, :] = -np.eye(self.ndx)
        elif firstsecond == 'second':
            J[:, :] = np.eye(self.ndx)
        return J
def Jdiff ( self , x1 , x2 , firstsecond = 'both' ) : assert ( firstsecond in [ 'first' , 'second' , 'both' ] ) if firstsecond == 'both' : return [ self . Jdiff ( x1 , x2 , 'first' ) , self . Jdiff ( x1 , x2 , 'second' ) ] J = np . zeros ( [ self . ndx , self . ndx ] ) if firstsecond == 'first' : J [ : , : ] = - np . eye ( self . ndx ) elif firstsecond == 'second' : J [ : , : ] = np . eye ( self . ndx ) return J
Jacobians for the x2 - x1.
Jacobians for the x2 - x1 .
""" Jacobians for the x2 - x1.

        :param x1: current state
        :param x2: next state
        :param firstsecond: desired partial derivative
        :return the partial derivative(s) of the diff(x1,x2) function
        """
self
x1
x2
firstsecond