I am currently developing a differential operator for sympy
that can be placed in matricial form.
In this case the order of the args
list when creating a Mul
object is very important to guarantee that the differentiation is performed where it is required only.
The issue is that, when the following is done:
input = (t,z,x)
Mul(*input).args
It returns (t, x, z)
because some rearrangement in args
took place. How to avoid args
to be sorted?
r*D(z)*z
will return aMul
object, but currently it returns in the following order(r, z, D(z))
, which makes it difficult to apply the operator correctly. See here for more details. – Amok