pub fn parse_shape_constraint(raw: &str) -> Result<ShapeConstraint, String>Expand description
Parse a shape-constraint string into a ShapeConstraint.
This is the single source of truth shared by the formula DSL
(s(x, shape=...)) and the smooths={...} override path
(Smooth.shape_constraint). The accepted spellings cover the canonical
Python ShapeConstraintLiteral strings exactly
("none" / "monotone_increasing" / "monotone_decreasing" /
"convex" / "concave") plus a few common aliases. Hyphens and case are
normalized, so "Monotone-Increasing" and "mono_inc" both resolve to
ShapeConstraint::MonotoneIncreasing.