Vector Expression

17 views
Skip to first unread message

Davide Sandona'

unread,
Apr 3, 2020, 5:30:16 PM4/3/20
to sympy
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!

Aaron Meurer

unread,
Apr 3, 2020, 5:32:08 PM4/3/20
to sympy
Take a look at how the class MatAdd is implemented. Note that is isn't
a trivial problem to solve, and there are still ongoing discussions on
the best way to do it (see for instance
https://github.com/sympy/sympy/pull/18769).

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 view this discussion on the web visit https://groups.google.com/d/msgid/sympy/1ab183ad-bfc6-474c-8b53-acb44946008d%40googlegroups.com.

Alan Bromborsky

unread,
Apr 3, 2020, 6:00:13 PM4/3/20
to sy...@googlegroups.com
You might find the following link of interest -

https://github.com/pygae/galgebra
Reply all
Reply to author
Forward
0 new messages