is_diag: Check if a Leaf is Diagonal

is_diagR Documentation

Check if a Leaf is Diagonal

Description

Reports the diag attribute of a Variable or Parameter, as CVXPY's Leaf.is_diag(). Defined for leaves only.

Usage

is_diag(x, ...)

Arguments

x

A Variable or Parameter.

...

Not used.

Value

Logical scalar: TRUE if x was created with diag = TRUE.


CVXR documentation built on Oct. 19, 2026, 5:07 p.m.