Hello, This looks like a bug. Please do submit a PR.
Thanks Faisal Riyaz On Thu, Aug 27, 2020 at 4:10 AM Alexander Lindsay <[email protected]> wrote: > This patch fixes the bad behavior: > > diff --git a/sympy/vector/operators.py b/sympy/vector/operators.py > index 2f303ee690..994894f379 100644 > --- a/sympy/vector/operators.py > +++ b/sympy/vector/operators.py > @@ -362,6 +362,4 @@ def _diff_conditional(expr, base_scalar, coeff_1, > coeff_2): > """ > from sympy.vector.functions import express > new_expr = express(expr, base_scalar.system, variables=True) > - if base_scalar in new_expr.atoms(BaseScalar): > - return Derivative(coeff_1 * coeff_2 * new_expr, base_scalar) > - return S.Zero > + return Derivative(coeff_1 * coeff_2 * new_expr, base_scalar) > > Should I submit a PR? > > On Wed, Aug 26, 2020 at 3:30 PM Alexander Lindsay < > [email protected]> wrote: > >> Execution of the below code: >> >> From sympy.vector import divergence, gradient, Vector, CoordSys3D >> R = CoordSys3D('R', transformation='cylindrical') >> divergence(R.i) >> >> generates a zero result. I believe the result should be 1/r, right? >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/CANFcJrFgKxs1S78dAWKRZeKKbxjHh_OsWWtT%2Btgz3EWW_3F6hw%40mail.gmail.com > <https://groups.google.com/d/msgid/sympy/CANFcJrFgKxs1S78dAWKRZeKKbxjHh_OsWWtT%2Btgz3EWW_3F6hw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAEe-xqSyp947SY4_2xJm02QJJPPxTDBoVdz2g7w26z83nwOQnw%40mail.gmail.com.
