I defined a user function by -

def dot(x,y):
    return(sympy.Function('dot')(*(x,y)))

I want the _print_Function in str.py to handle this in a special way so I modified it to

def _print_Function(self, expr):
        if expr.func.__name__ == 'dot':
            return '(%s|%s)' % (expr.args[0],expr.args[1])
        else:
return expr.func.__name__ + "(%s)"%self.stringify(expr.args, ", ")

but for example if "dot(a1,a2)" is in an expression then "dot(a1,a2)" prints and not "(a1|a2)".
What am I doing wrong?



--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to