I was trying to find out the best or the standard way to create a Matrix (or even tensor if you want to go crazy though I dont require that) with Sympy Variables.
I'll describe the only way I've thought of doing it. I found the method symarray (here):
A = symarray('a', (3,4))
type(A)
<class 'numpy.ndarray'>
A
array([[a_0_0, a_0_1, a_0_2, a_0_3],
[a_1_0, a_1_1, a_1_2, a_1_3],
[a_2_0, a_2_1, a_2_2, a_2_3]], dtype=object)
and I also noticed that one can wrap it with the Matrix sympy function:
B = Matrix( symarray('b', (3,4)) )
type(B)
<class 'sympy.matrices.dense.MutableDenseMatrix'>
B
Matrix([
[b_0_0, b_0_1, b_0_2, b_0_3],
[b_1_0, b_1_1, b_1_2, b_1_3],
[b_2_0, b_2_1, b_2_2, b_2_3]])
is there any one of the two that is the standard way of doing it? Which is the best or the way people usually create matrices with sympy variables?