class
AirSplitOptions
PythonOptions for the SPLIT operator.
AirSplitOptions()Options for the SPLIT operator.
Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.
attribute
axis
Pythonaxis: int = Field(0, description='Axis along which to split the input tensor')Axis along which to split the input tensor (default 0).
attribute
split_lengths
Pythonsplit_lengths: list[int] = Field(default_factory=list, description='Length of each split; -1 marks a length inferred from the axis size')Length of each split (default empty list). A
single -1 takes what the other lengths leave (SPLIT_V); all -1 splits
the axis evenly (SPLIT). See resolve_lengths.
attribute
num_splits
Pythonnum_splits: intmethod
resolve_lengths
PythonReturn the concrete split lengths for a split axis of axissize.
resolve_lengths(axis_size: int) -> list[int]Return the concrete split lengths for a split axis of axis_size.
Raises
| Type | Description |
|---|---|
ValueError | If a length is below -1, -1 appears more than once without filling every entry, or the lengths cannot tile ``axis_size``. |