@property
    def nP(self):
        inds = []
        if getattr(self, '_nP', None) is None:
            for name in self.propMap._properties:
                index = getattr(self.propMap, '%sIndex'%name, None)
                if index is not None:
                    if type(index) is slice:
                        inds += range(*index.indices(len(self.vector)))
                    else:
                        inds += list(index)
            self._nP = len(set(inds))
        return self._nP
dataset/ETHPy150Open simpeg/simpeg/SimPEG/PropMaps.py/PropModel.nP/original