lentil.field.extent

lentil.field.extent(shape, offset)[source]

Compute shifted array extent

Parameters
  • shape (array_like) – Array shape

  • offset (array_like) – Array offset

Returns

rmin, rmax, cmin, cmax – Indices that define the span of the shifted array.

Return type

int

Notes

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

See also

lentil.field.boundary

compute the extent around a number of Fields