votes up 2

First argument of MatrixElement should be a matrix

Package:
sympy
github stars 8356
Exception Class:
TypeError

Raise code

            if n.is_Integer and m.is_Integer:
                return name[n, m]
        if isinstance(name, str):
            name = Symbol(name)
        else:
            name = _sympify(name)
            if not isinstance(name.kind, MatrixKind):
                raise TypeError("First argument of MatrixElement should be a matrix")
        obj = Expr.__new__(cls, name, n, m)
        return obj

    def doit(self, **kwargs):
        deep = kwargs.get('deep', True)
        if deep:
            args = [arg.doit(**kwargs) for arg in self.args]
😲  Walkingbet is Android app that pays you real bitcoins for a walking. Withdrawable real money bonus is available now, hurry up! 🚶

NO FIXES YET

Just press the button and we will add solution
to this exception as soon as possible

* As many users press the button, the faster we create a fix

Add a possible fix

Please authorize to post fix