Skip to content

Commit

Permalink
cache evaluable.compile
Browse files Browse the repository at this point in the history
  • Loading branch information
joostvanzwieten committed May 31, 2024
1 parent 3181012 commit b725ef1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nutils/evaluable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5026,6 +5026,7 @@ def eval_sparse(funcs: AsEvaluableArray, **arguments: typing.Mapping[str, numpy.
yield data


@functools.lru_cache(32)
def compile(func, /, *, simplify: bool = True, stats: typing.Optional[str] = None, cache_const_intermediates: bool = True):
'''Returns a callable that evaluates ``func``.
Expand Down

0 comments on commit b725ef1

Please sign in to comment.