Implementations of DataTransformer.

class ChainedDataTransformer(transformers: Iterable[DataTransformer], extend: bool = True)[source]#

Bases: DataTransformer

Combine multiple DataTransformer classes into one.

  • transformer – Ordered list of transformers that you want to chain.

  • extend – Set to True in order to keep keys of each output DataSample and collect them into the final, chained DataSample.

transformers: tuple[DataTransformer, ...][source]#
extend: bool[source]#
class IdentityTransformer[source]#

Bases: DataTransformer

DataTransformer that leaves a DataSample intact.

class SympyDataTransformer(functions: Mapping[str, Function[DataSample, ndarray]])[source]#

Bases: DataTransformer

Implementation of a DataTransformer.

property functions: dict[str, Function[DataSample, ndarray]][source]#

Read-only access to the internal mapping of functions.

classmethod from_sympy(expressions: dict[Symbol, Expr], backend: str, *, use_cse: bool = True, max_complexity: int | None = None) SympyDataTransformer[source]#