dot-constant_grad: Gradient of a Constant Expression

.constant_gradR Documentation

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)

Arguments

expr

An expression.

Details

Mirrors cvxpy/utilities/grad.py:constant_grad.

Value

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


CVXR documentation built on Aug. 24, 2026, 9:10 a.m.