Take#

class bayesflow.adapters.transforms.Take(indices: Sequence[int], axis: int = -1)[source]#

Bases: ElementwiseTransform

A transform to reduce the dimensionality of arrays output by the summary network Example: adapter.take(“x”, np.arange(0,3), axis=-1)

forward(data: ndarray, **kwargs) ndarray[source]#
inverse(data: ndarray, **kwargs) ndarray[source]#
get_config() dict[source]#
__call__(data: ndarray, inverse: bool = False, **kwargs) ndarray#

Call self as a function.

classmethod from_config(config: dict, custom_objects=None)#
log_det_jac(data: ndarray, inverse: bool = False, **kwargs) ndarray | None#