dagstd.constants package
Submodules
dagstd.constants.constant module
constant.py contains a Constant function that acts as an op that returns whatever value is passed to it.
- dagstd.constants.constant.Constant(value: Any, suffix: Optional[str] = None, make_unique: bool = True) Any[source]
Acts as an op that returns whatever value is passed to it on creation.
- Parameters
value (Any) – The value to return.
suffix (str, default=None) – A suffix to append to the op name.
make_unique (bool, default=True) – If True, the op name will be suffixed with a UUID. Is overridden if the suffix argument is provided.
The name of the op is the value passed to it plus a unique ID to allow
having multiple constants with the same value. Alternatively, you can
pass a suffix to the Constant function to be used instead of the unique ID.
dagstd.constants.numbers module
numbers.py contains ops that return common numbers. These ops are capitalised to make them seem more like classes, which helps with readability.