code: def _tomask(self, indices, element):
          r
          element = self._parse_element(element, single=True)
          indices = self._parse_indices(indices)
          N = sp.shape(self[element + '.all'])[0]
          ind = sp.array(indices, ndmin=1)
          mask = sp.zeros((N, ), dtype=bool)
          mask[ind] = True
          return mask
docs: r"""
          This is a generalized version of tomask that accepts a string of
          'pore' or 'throat' for programmatic access.