lentil.extent.array_extent#

lentil.extent.array_extent(shape, shift, parent_shape=None)[source]#

Compute the extent of a shifted array.

Parameters:
  • shape ((2,) array_like) – Array shape

  • shift ((2,) array_like) – Array shift in (r, c)

  • parent_shape ((2,) array like or None, optional) – Enclosing parent shape. If None, the returned extent is relative to the origin (0,0). If provided, the returned extent is relative to the upper left corner of the parent shape.

Notes

To use the values returned by extent() in a slice, rmax and cmax should be increased by 1.