Imagine you have the following sympy expression:
'1.0 * H * L * * 3 * W * *2'
which contains the sp.Symbols variables=[H, L and W].
if this expression is lambdify-ed using sp.lambdify([sp.Symbol(vari) for vari in variables],'1.0 * H * L * * 3 * W * *2') you obtain a <function _lambdifygenerated(H, L, W)>.
However, I need to obtain a <function _lambdifygenerated(x)> where H=x[0], L=x[1], and W=x[2].
I have tried to xreplace{H: 'x[0]', W: 'x[1]', L: 'x[2]'} directly on the original expression '1.0 * H * L * * 3 * W * *2' and then lambdify with x as lambda.
This didn't work, but even if it would work after some tries I feel it is not the way to go.
Does anyone have any advice on how to deal with this?
Thank you very much!