The keys in the lambdify modules dictionary should be strings, which
are the names that are looked up in the lambdified function. Setting
them as expressions as you are doing here does not work. The
documentation that I've written in this unmerged pull request explains
this better
https://github.com/sympy/sympy/pull/13485.
Your indirect replacement doesn't work because SymPy converts the
string "dxx(x, y, z)" to a symbol named "dxx(x, y, z)", not a
function. If you instead define
dxx = Function('dxx')
and so on, and
subs({sympy.Derivative(ux, x): dxx(x, y, z), ...})
it works.
Of course, it's all much simpler if you just use SymPy objects, like
substituting Derivative(ux, x) for 1 directly, or substituting ux for
whatever it is, at let SymPy do the math.
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 post to this group, send email to
sy...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sympy.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sympy/d5a20080-6571-4473-b78d-23780ed993f3%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.