box_mask#

box_mask(shape, center, height)[source]#

Creates a box mask centered around the provided center point.

Parameters:
shapetuple of ints

Shape of the output array.

centertuple of ints

Center point coordinates of the box.

heighttuple of ints

Height (side length) of the box along each axis.

Returns:
NDArray

The created box mask.

Raises:
ValueError

If shape and center do not have the same length. If center and height do not have the same length.