A few days ago I opened an issue requesting information about vector expressions [1]. Thanks to covid lock-down I had enough free-time to develop something. In the issue it was suggested that I could open a pull-request, but before doing that I would like to solve a problem I'm having a hard time comprehending. This is the link to the repo I'm working on [2].
The problem is with the class VecAdd; ideally, I would like it to subclass the class Add, so that it would "simplify" the arguments. However, if I do that, the evaluation of n-derivatives would return instances of the class Add!
I checked the output of _eval_derivative_n_times which is of type VecAdd, however it must be intercepted by some other function and finally it returns an instance of the class Add. I absolutely need it to return an instance of VecAdd.
Can someone help me understand what the problem is and suggest corrective actions?
Thanks!