I really like the evaluate=False flag on parse_expr. But, since log(0.1) automatically evaluates to a float, I'm trying to create an unevaluated version of log. However, I'm getting strange results where log is implicitly defined.
As shown below, once I define a function log that does nothing, sympy somehow implicitly defines it to be the usual log function.
Am I missing how this works or is this aberrant behavior?
My eventual plan is to have log.doit() return the original sympy function.
If I call the function something else, like llog, then I don't run into the behavior. But, I'm not sure how to make printers display my llog function as log.
Thanks,
Duane
In [1]: from sympy import Function
In [2]: log
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-9a115ebc25a0> in <module>()
----> 1 log
NameError: name 'log' is not defined
In [3]: class log(Function):
...: pass
...:
In [4]: log
Out[4]: __main__.log
In [5]: log(0.1)
Out[5]: -2.30258509299405