You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting, but I don't think this is easily fixable as the dynamic object doesn't remember its original source.
It may require decompiling the underlying bytecodes into some corresponding source or AST. Since bytecodes lack the original representation of the source code, the result could be distant from the original even if we could restore it.
Maybe the possible workaround is to provide a functionality that takes the source code directly, as in #108 .
exec("""
def solve(a, b, c):
return (-b + math.sqrt(b**2 - 4ac)) / (2*a)
""")
lat = latexify.get_latex(solve)
Will result in: OSError: could not extract source code
The text was updated successfully, but these errors were encountered: