split_shape#

split_shape(shape, splits, equal_shape=True)[source]#

Splits shape into equally sized and potentially overlapping subsets.

Parameters:
shapetuple of ints

Shape to split.

splitsdict

Dictionary mapping axis number to number of splits.

equal_shapedict

Whether the subsets should be of equal shape, True by default.

Returns:
tuple

Tuple of slice with requested split combinations.