_as_float_vector
Signature
_as_float_vector(
name: str,
values: ArrayLike,
*,
allow_empty: bool = False,
) -> FloatVector
What problem it solves
Normalizes a numeric input into a one-dimensional, finite float64 array. It is the base check used by multiple package modules.
Input contract
valuesmust be convertible withnumpy.asarray(..., dtype=float).The result must be one-dimensional.
If
allow_empty=False, the array cannot be empty.All elements must be finite.
Where it is used
internally by almost all public functions in
stats_utilsin
histogramin
lin_fit
Failure modes
ValueErrorif the input is not one-dimensionalValueErrorif the input is empty when that is not allowedValueErrorifNaNvalues or infinities are present
Why it stays private
It is a shared infrastructure detail. Documenting it helps explain the package, but exposing it as a public API would unnecessarily constrain the internal implementation.