Split#

class bayesflow.adapters.transforms.Split(key: str, into: Sequence[str], indices_or_sections: int | Sequence[int] = None, axis: int = -1)[source]#

Bases: Transform

This is the effective inverse of the Concatenate Transform.

Parameters:
keystr

The key to split in the forward transform.

into: Sequence[str]

The names of each split after the forward transform.

indices_or_sectionsint | Sequence[int], optional, default: None

The number of sections or indices to split on. If not given, will split evenly into len(into) parts.

axis: int, optional, default: -1

The axis to split on.

classmethod from_config(config: dict, custom_objects=None) Split[source]#
get_config() dict[source]#
forward(data: dict[str, ndarray], strict: bool = True, **kwargs) dict[str, ndarray][source]#
inverse(data: dict[str, ndarray], strict: bool = False, **kwargs) dict[str, ndarray][source]#
extra_repr() str[source]#
__call__(data: dict[str, ndarray], *, inverse: bool = False, **kwargs) dict[str, ndarray]#

Call self as a function.