expr_kind(e) is SymPy's e.kind: the mathematical kind of an object,
independent of its class. Numbers, commutative symbols and arithmetic of
them are NumberKind; Booleans and relations BooleanKind; matrices
MatrixKind(element kind); arrays ArrayKind(...); sets
SetKind(...); tuples TupleKind(...); vectors VectorKind(...);
quantum states and operators KetKind, BraKind and OperatorKind;
anything else, including applied functions other than exp,
UndefinedKind. (kind() is the Fortran intrinsic of the code
generation nodes.)
Usage
expr_kind(e)
NumberKind
UndefinedKind
BooleanKind
KetKind
BraKind
OperatorKind
MatrixKind(element_kind = NumberKind)
ArrayKind(element_kind = NumberKind)
VectorKind(element_kind = NumberKind)
SetKind(element_kind = NULL)
TupleKind(...)