chore: improved docstring for skdecimal

This commit is contained in:
Matthias
2025-05-09 06:32:43 +02:00
parent 7cfecab7e2
commit ce7d81325d

View File

@@ -6,12 +6,19 @@ class SKDecimal(FloatDistribution):
self,
low: float,
high: float,
*,
step: float | None = None,
decimals: int = 3,
name=None,
):
"""
FloatDistribution with a fixed step size.
Only one of step or decimals can be set.
:param low: lower bound
:param high: upper bound
:param step: step size (e.g. 0.001)
:param decimals: number of decimal places to round to (e.g. 3)
:param name: name of the distribution
"""
if decimals is not None and step is not None:
raise ValueError("You can only set one of decimals or step")