chore: improved docstring for skdecimal
This commit is contained in:
@@ -6,12 +6,19 @@ class SKDecimal(FloatDistribution):
|
|||||||
self,
|
self,
|
||||||
low: float,
|
low: float,
|
||||||
high: float,
|
high: float,
|
||||||
|
*,
|
||||||
step: float | None = None,
|
step: float | None = None,
|
||||||
decimals: int = 3,
|
decimals: int = 3,
|
||||||
name=None,
|
name=None,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
FloatDistribution with a fixed step size.
|
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:
|
if decimals is not None and step is not None:
|
||||||
raise ValueError("You can only set one of decimals or step")
|
raise ValueError("You can only set one of decimals or step")
|
||||||
|
|||||||
Reference in New Issue
Block a user