tilus.ir.layout.squeeze

Contents

tilus.ir.layout.squeeze

tilus.ir.layout.squeeze(layout, dims)[source]

Squeeze the layout over the given dimensions.

The squeeze function will return a new layout with the dimensions specified in dims removed from the layout. The specified dimensions must be in the range [0, len(layout.shape)), and the corresponding dimensions in the layout must have size 1.

Parameters:
  • layout (RegisterLayout) – The layout to squeeze.

  • dims (Sequence[int]) – The dimensions to squeeze. The dimensions must be in the range [0, len(layout.shape)).

Returns:

ret – The squeezed layout.

Return type:

RegisterLayout