Skip to content

Commit 007c8c0

Browse files
committed
One more lru_cache
1 parent 77b93ad commit 007c8c0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mathics/builtin/arithmetic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class _MPMathFunction(SympyFunction):
6666

6767
nargs = 1
6868

69+
@lru_cache(maxsize=1024)
6970
def get_mpmath_function(self, args):
7071
if self.mpmath_name is None or len(args) != self.nargs:
7172
return None
@@ -75,7 +76,7 @@ def apply(self, z, evaluation):
7576
"%(name)s[z__]"
7677

7778
args = z.numerify(evaluation).get_sequence()
78-
mpmath_function = self.get_mpmath_function(args)
79+
mpmath_function = self.get_mpmath_function(tuple(args))
7980
result = None
8081

8182
# if no arguments are inexact attempt to use sympy

0 commit comments

Comments
 (0)