copapy.jacobian#
- copapy.jacobian(x, y)#
Returns the Jacobian dx/dy where x and y might be a scalar, a list of scalars, a vector or a tensor. The result has the shape x.shape + y.shape. It is calculated with one reverse-mode pass of grad per element of x.
- Overloads:
x (
value[Any]), y (quaternion) →quaternionx (
vector[Any] |tensor[Any] |quaternion), y (value[Any] |vector[Any] |tensor[Any] |quaternion) →tensor[float]x (
Sequence[Any]), y (Sequence[value[Any]]) →list[list[value[float] | float]]x (
Sequence[Any]), y (value[Any]) →list[value[float] | float]
For a scalar x the result is the same as of grad(x, y). The result is a list of lists if x and y are lists and otherwise a tensor. Arrays are not supported, an array can be used as tensor by cp.tensor(arr).
- Parameters:
x (
Any) – Value to return derivative ofy (
value[Any] |Sequence[value[Any]] |vector[Any] |tensor[Any] |quaternion) – Value(s) to derive in respect to
- Returns:
Derivative of x with the dimensions of x and y