```julia let @variables q[1:5] Symbolics.gradient( sum(q .* log.(q)), collect(q) ) end ``` This outputs a vector of zeros: `[0, 0, 0, 0, 0]`, but the correct gradient consists of elements like `1 + log(q[k])`: ```python import sympy as sp q = sp.symbols("q1:5", real=True) the_sum = sum( q_ * sp.log(q_) for q_ in q ) sp.Matrix([ [the_sum.diff(q_) for q_ in q] ]).T ``` Output:  ┆Issue is synchronized with this [Trello card](https://trello.com/c/vjRceAEn) by [Unito](https://www.unito.io)