plaid.containers.features.scalars¶
Module for implementing collections of features within a Sample.
Classes¶
A container for scalar features within a Sample. |
Module Contents¶
- class SampleScalars(scalars: dict[str, plaid.types.Scalar] | None)[source]¶
A container for scalar features within a Sample.
Provides dict-like operations for adding, retrieving, and removing scalars.
Names must be unique and may not contain the character
/.- Parameters:
scalars (dict[str, Scalar], optional) – a dict containing the pairs of (name, value) for each scalar in the Sample.
- add(name: str, value: plaid.types.Scalar) None[source]¶
Add a scalar value to a dictionary.
- Parameters:
name (str) – The name of the scalar value.
value (Scalar) – The scalar value to add or update in the dictionary.