Learn R Programming

CVXR (version 1.9.1)

.constant_grad: Gradient of a Constant Expression

Description

Returns a Variable -> Jacobian list for an expression that is constant in all of its variables. Each Jacobian is the appropriate-shape zero (a scalar 0 for scalar/scalar; a sparse zero matrix otherwise).

Usage

.constant_grad(expr)

Value

A list keyed by variable id (as character), each entry the zero Jacobian.

Arguments

expr

An expression.

Details

Mirrors cvxpy/utilities/grad.py:constant_grad.