'Set or clear the mask array.  This is either None, or a boolean
array of shape (ntri).'

def set_mask(self, mask):

    if (mask is None):
        self.mask = None
    else:
        self.mask = np.asarray(mask, dtype=bool)
        if (self.mask.shape != (self.triangles.shape[0],)):
            raise ValueError(u'mask    array    must    have    same    length    as    triangles    array')
    if (self._cpp_triangulation is not None):
        self._cpp_triangulation.set_mask(self.mask)
    self._edges = None
    self._neighbors = None
    if (self._trifinder is not None):
        self._trifinder._initialize()
