![]() |
Sleipnir Python API
|
Public Member Functions | |
| None | __init__ (self, Real|float expression, Real|float wrt) |
| None | __init__ (self, Real|float expression, Matrix|Submatrix wrt) |
| None | __init__ (self, Matrix|Submatrix expressions, Matrix|Submatrix wrt) |
| Matrix | get (self) |
| scipy.sparse.csc_matrix[numpy.float64] | value (self) |
This class calculates the Jacobian of a vector of expressions with
respect to a vector of variables.
The Jacobian is only recomputed if the expression is quadratic or
higher order, or if it's linear with coefficients that depend on
parameters.
Template Args:
Scalar: Scalar type.
| None sleipnir.autodiff.Jacobian.__init__ | ( | self, | |
| Matrix | Submatrix | expressions, | ||
| Matrix | Submatrix | wrt | ||
| ) |
Constructs a Jacobian object.
Args:
expression: Expression of which to compute the Jacobian.
wrt: Variable with respect to which to compute the Jacobian.
| Matrix sleipnir.autodiff.Jacobian.get | ( | self | ) |
Returns the Jacobian as a Matrix.
This is useful when constructing optimization problems with
derivatives in them.
Returns:
The Jacobian as a Matrix.
| scipy.sparse.csc_matrix[numpy.float64] sleipnir.autodiff.Jacobian.value | ( | self | ) |
Evaluates the Jacobian at wrt's value.
Returns:
The Jacobian at wrt's value.