FlattenTuple

class hybrid_learning.datasets.transforms.tuple_transforms.FlattenTuple(selected_index=0)[source]

Bases: _SingleIndexTupleTrafo

Return the value of a sequence at selected index.

Public Data Attributes:

Inherited from : py: class:_SingleIndexTupleTrafo

settings

Settings to reproduce the instance.

Inherited from : py: class:Transform

IDENTITY_CLASS

The identity class or classes for composition / addition.

settings

Settings to reproduce the instance.

Public Methods:

apply_to(*sequence)

Flatten annotations dict to its value at the configured key.

Inherited from : py: class:Transform

apply_to(*sequence)

Flatten annotations dict to its value at the configured key.

Special Methods:

Inherited from : py: class:_SingleIndexTupleTrafo

__init__([selected_index])

Init.

Inherited from : py: class:Transform

__repr__()

Return repr(self).

__eq__(other)

Return self==value.

__copy__()

Return a shallow copy of self using settings.

__add__(other)

Return a flat composition of self with other.

__radd__(other)

Return a flat composition of other and self.

__call__(*inps)

General call to the transformation.


Parameters

selected_index (int) –

apply_to(*sequence)[source]

Flatten annotations dict to its value at the configured key. The configured key is stored in selected_index.

Return type

Any