_validate_decimals
Signature
_validate_decimals(decimals: int) -> int
What problem it solves
Ensures that the precision used for labels and legends stays readable in plot labels.
Input contract
decimalsmust be a real integer or annp.integer.Booleans are explicitly rejected.
The value must be between 0 and 20.
Where it is used
in
histogramto format ticks, the mean, and the band
How it fails
ValueErrorifdecimalsis not an integerValueErrorifdecimals < 0ValueErrorifdecimals > 20
Why it remains private
It is a presentation-oriented validation rule, used internally by histogram and not intended as a standalone public utility.