Open JCGoran opened 4 days ago
one could still isolate it to make sure there's one notion of how to convert random stuff to symbols.
In principle yes, but I feel that it would undoubtedly involve a bunch of heuristics (much like what SymPy is actually doing under the hood anyway). The least error-prone idea is to just put sympy_vars = {str(var) : var for var in vars}
, and require the user passes an iterable of sympy objects (like [sp.Function('f'), sp.Symbol('x')]
), and raise an error if they pass anything else.
Note that the independent var we are diffing against should not be an indexed var (yet), but every other var is fair game.