csnlp.core.debug.NlpDebugEntry#

class csnlp.core.debug.NlpDebugEntry(name: str, type: Literal['Parameter', 'Decision variable', 'Equality constraint', 'Inequality constraint'], shape: tuple[int, ...], filename: str, function: str, lineno: int, context: str)[source]#

Bases: NamedTuple

Class representing a single entry of the debug information for an csnlp.Nlp instance.

Methods

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

context

Context in which the quantity is defined.

filename

Name of the file where the quantity is defined.

function

Name of the function/method where the quantity is defined.

lineno

Line number where the quantity is defined.

name

Name of the quantity.

shape

Shape of the quantity.

type

Type of the quantity.

context: str#

Context in which the quantity is defined.

count(value, /)#

Return number of occurrences of value.

filename: str#

Name of the file where the quantity is defined.

function: str#

Name of the function/method where the quantity is defined.

index(value, start=0, stop=sys.maxsize, /)#

Return first index of value.

Raises ValueError if the value is not present.

lineno: int#

Line number where the quantity is defined.

name: str#

Name of the quantity.

shape: tuple[int, ...]#

Shape of the quantity.

type: Literal['Parameter', 'Decision variable', 'Equality constraint', 'Inequality constraint']#

Type of the quantity.