- sherpa.models.model.modelCacher1d(func)[source] [edit on github]
A decorater to cache 1D ArithmeticModel evalutions.
Apply to the
calcmethod of a 1D model to allow the model evaluation to be cached. The decision is based on the
_use_cachingattribute of the cache along with the
integratesetting, the evaluation grid, and parameter values.
MyModelmodel evaluations to be cached:
def MyModel(ArithmeticModel): ... @modelCacher1d def calc(self, *args, **kwargs): ...