SciPy

numpy.ma.masked_array.hardmask

masked_array.hardmask

Hardness of the mask