Restore compiled autowrap code

48 views
Skip to first unread message

Егор Перевощиков

unread,
Sep 1, 2022, 1:12:25 PM9/1/22
to sympy
For example I compile an expression

from sympy.utilities.autowrap import autowrap
from sympy.abc import a, b

expr = (a + b)**a
expr_compiled = autowrap(expr, args=(a, b), tempdir="somedir")

How can I now use "expr_compiled" in other python script?

Aaron Meurer

unread,
Sep 1, 2022, 3:01:16 PM9/1/22
to sy...@googlegroups.com
When you specify the tempdir, the module is saved in that directly, called wrapped_module_0 and so on. You can import this module from another Python process, like

import somedir.warpper_module_1

Aaron Meurer

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/ce99633f-930e-4d75-818c-79230782fe98n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages