lpspline.constraints.bound.Bound#

class lpspline.constraints.bound.Bound(lower: float | None = None, upper: float | None = None, n: int = 100, start: float | None = None, end: float | None = None)[source]#

Bases: Constraint

Constraint enforcing lower and upper bounds on the spline output values using a grid-based discretization approach.

build_constraint(s) list[source]#

Constructs the CVXPY bound constraints by evaluating the spline basis on a grid.

Parameters:

s (Spline) – The parent Spline applying this restriction.

Returns:

A list containing CVXPY constraint objects.

Return type:

list