modelCacher1d¶
- 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 theintegratesetting, the evaluation grid, and parameter values.Example
Allow
MyModelmodel evaluations to be cached:def MyModel(ArithmeticModel): ... @modelCacher1d def calc(self, *args, **kwargs): ...