def apply_to(self, model, **kwds): """ Apply the transformation to the given model. """ timer = TransformationTimer(self, 'in-place') if not hasattr(model, '_transformation_data'): model._transformation_data = TransformationData() self._apply_to(model, **kwds) timer.report()
def apply_to(self, model, **kwds): """ Apply the transformation to the given model. """ timer = TransformationTimer(self, 'in-place') if not hasattr(model, '_transformation_data'): model._transformation_data = TransformationData() self._apply_to(model, **kwds) timer.report()
def create_using(self, model, **kwds): """ Create a new model with this transformation """ timer = TransformationTimer(self, 'out-of-place') if not hasattr(model, '_transformation_data'): model._transformation_data = TransformationData() new_model = self._create_using(model, **kwds) timer.report() return new_model
def create_using(self, model, **kwds): """ Create a new model with this transformation """ timer = TransformationTimer(self, 'out-of-place') if not hasattr(model, '_transformation_data'): model._transformation_data = TransformationData() new_model = self._create_using(model, **kwds) timer.report() return new_model