def profile(self): if self.dimensionality == 1: return Profile1DFromDataset(self) if self.dimensionality == 2: return Profile2DFromDataset(self) if self.dimensionality == 3: return Profile3DFromDataset(self) return None
def profile(self): if self._profile is not None: return self._profile if self.dimensionality == 1: self._profile = Profile1DFromDataset(self) elif self.dimensionality == 2: self._profile = Profile2DFromDataset(self) elif self.dimensionality == 3: self._profile = Profile3DFromDataset(self) else: self._profile = None return self._profile