From dee13565a9366548aff358e083e9d60f59674a5e Mon Sep 17 00:00:00 2001 From: Sebastian Heuchler Date: Wed, 4 Sep 2024 15:17:09 +0200 Subject: [PATCH] Translate log2 and log10 to their direct sympy equivalents instead of log(x)/log(base) --- pysr/export_sympy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysr/export_sympy.py b/pysr/export_sympy.py index f3859341..7864d07e 100644 --- a/pysr/export_sympy.py +++ b/pysr/export_sympy.py @@ -39,8 +39,8 @@ "erf": sympy.erf, "erfc": sympy.erfc, "log": lambda x: sympy.log(x), - "log10": lambda x: sympy.log(x, 10), - "log2": lambda x: sympy.log(x, 2), + "log10": lambda x: sympy.codegen.cfunctions.log10(x), + "log2": lambda x: sympy.codegen.cfunctions.log2(x), "log1p": lambda x: sympy.log(x + 1), "log_abs": lambda x: sympy.log(abs(x)), "log10_abs": lambda x: sympy.log(abs(x), 10),