(e)
return False
Helper method used in Tr
Helper method used in Tr
Helper method used in Tr
def _is_scalar(e):
    """ Helper method used in Tr"""

    # sympify to set proper attributes
    e = sympify(e)
    if isinstance(e, Expr):
        if (e.is_Integer or e.is_Float or
            e.is_Rational or e.is_Number or
            (e.is_Symbol and e.is_commutative)
                ):
            return True

    return False
def _is_scalar ( e ) : # sympify to set proper attributes e = sympify ( e ) if isinstance ( e , Expr ) : if ( e . is_Integer or e . is_Float or e . is_Rational or e . is_Number or ( e . is_Symbol and e . is_commutative ) ) : return True return False