Add `mask` parameter to `unwrap_phase`

Author: matthew-brettCreated Jun 2, 2026Updated Sep 10, 2026
Labels:pray: Feature request

Description:

As suggested in this comment, we should add a mask= parameter to src/_skimage2/restoration/unwrap.py:unwrap_phase. As in:

python
def unwrap_phase(image, mask=None, wrap_around=False, rng=None):

instead of the current:

python
def unwrap_phase(image, wrap_around=False, rng=None):

One question would be, what to do with input image masked arrays. We could error (annoying), or quietly accept them, combining with the mask= mask, or warn.

Source: scikit-image/scikit-image