_validate_positive_vector
Signature
_validate_positive_vector(
name: str,
values: ArrayLike,
*,
expected_shape: tuple[int, ...] | None = None,
) -> FloatVector
What problem it solves
Validates vectors that must be numeric, one-dimensional, finite, and strictly positive. In fit_utils it is mainly used for sigma_y and sigma_x.
Input contract
The base conversion passes through
_as_float_vector.If
expected_shapeis provided, the vector shape must match exactly.Each element must be greater than zero.
Where it is used
Failure modes
ValueErrorif the input does not pass the_as_float_vectorchecksValueErrorif the shape does not matchexpected_shapeValueErrorif at least one value is less than or equal to zero
Why it stays private
It is a validator tightly tied to the package’s linear-fit domain. Keeping it internal avoids promising a general-purpose semantics for all positive vectors.