baybe.transformations.utils.compress_transformations¶
- baybe.transformations.utils.compress_transformations(transformations: Iterable[Transformation], /)[source]¶
Compress any iterable of transformations by removing redundancies.
Drops identity transformations and combines subsequent affine transformations.
- Parameters:
transformations (
Iterable
[Transformation
]) – An iterable of transformations.- Return type:
- Returns:
The minimum sequence of transformations that is equivalent to the input.