darsia.perimeter#

perimeter(box)[source]#

Returns the perimeter of a box. Accepts both tuples of slices as well as arrays of coordinates as input.

Parameters:
boxtuple of slices or np.ndarray

Definition of a box, either as tuple of slices, or coordinates (can also use metric units).

Returns:
Float or int (depending on input): perimeter.