Type of expression when matrix is initialized

32 views
Skip to first unread message

Ravi

unread,
May 19, 2018, 2:50:46 PM5/19/18
to sympy
What's the type of the element initialized as a matrix expression. 

For example 

X = MatrixSymbol('X', 3, 3)
>>> Matrix(X)
Matrix([
[X[0, 0], X[0, 1], X[0, 2]],
[X[1, 0], X[1, 1], X[1, 2]],
[X[2, 0], X[2, 1], X[2, 2]]])

type(X[0,0]) = ? 


Bibhu Prasad Pala

unread,
Jul 21, 2018, 9:48:11 AM7/21/18
to sympy
type(X[0,0]) =  <class 'sympy.matrices.expressions.matexpr.MatrixElement'>
Reply all
Reply to author
Forward
0 new messages