_validate_decimals
Signature
_validate_decimals(decimals: int) -> int
What problem it solves
Ensures that the precision used for labels and legends remains readable and consistent across the package plotting functions.
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
How it fails
ValueErrorifdecimalsis not an integerValueErrorifdecimals < 0ValueErrorifdecimals > 20
Why it remains private
It is a presentation-oriented validation rule, shared internally by the plotting APIs but not intended as a standalone public utility.