squidpy.im.ImageContainer.generate_equal_crops

ImageContainer.generate_equal_crops(size=None, as_array=False, squeeze=True, **kwargs)[source]

Decompose image into equally sized crops.

Parameters
Yields

The crops, whose type depends on as_array.

Notes

Crops going outside out of the image boundary are padded with cval.

Return type

Union[Iterator[ImageContainer], Iterator[dict[str, ndarray[Any, dtype[Any]]]]]