combine_masks#

astropy.utils.masked.combine_masks(masks, *, out=None, where=True, copy=True)[source]#

Combine masks, possibly storing it in some output.

Parameters:
maskspython:tuple of array of bool or python:False or python:None

Input masks. Any that are None or False are ignored. Should broadcast to each other. For structured dtype, an element is considered masked if any of the fields is.

outarray, optional

Possible output array to hold the result.

wherearray of bool, optional

Which elements of the output array to fill.

copybool optional

Whether to ensure a copy is made. Only relevant if just a single input mask is not None, and out is not given.

Returns:
maskarray

Combined mask.