in src/latex2sympy2_extended/latex2sympy2.py [0:0]
def mat_mul_flat(self, lh, rh):
if hasattr(lh, 'is_MatMul') and lh.is_MatMul or hasattr(rh, 'is_MatMul') and rh.is_MatMul:
args = []
if hasattr(lh, 'is_MatMul') and lh.is_MatMul:
args += list(lh.args)
else:
args += [lh]
if hasattr(rh, 'is_MatMul') and rh.is_MatMul:
args = args + list(rh.args)
else:
args += [rh]
return sympy.MatMul(*[arg for arg in args], evaluate=False)
else:
# We don't have to doit there
# if hasattr(lh, 'is_Matrix'):
# lh = lh.doit()
# if hasattr(rh, 'is_Matrix'):
# rh = rh.doit()
return sympy.MatMul(lh, rh, evaluate=False)