Working with a sympy Matrix or numpy array of sympy symbols, how does one take the element-wise logarithm?
For example, if I have:
m=sympy.Matrix(sympy.symbols('a b c d'))
Then np.abs(m)
works fine, but np.log(m)
does not work ("AttributeError: log").
Any solutions?
numpy.log
on object arrays (e.g. sympy arrays). – Diminishedm
you've defined is not square (it's 1-by-4), so it doesn't have a matrix log. – Diminished