centered_mask#

centered_mask(arr, new_shape)[source]#

Mask the centered portion of an array based on a new shape.

Parameters:
arrBackendArray

Input data.

new_shapetuple of ints

Desired shape for the mask.

Returns:
BackendArray

Array with central portion unmasked and the rest set to 0.