Help me please

16 views
Skip to first unread message

Thodosss s

unread,
Jul 30, 2019, 5:49:52 AM7/30/19
to mathics-devel
Hello and greetings from greece
I am not very familiar to python so I have some difficulties 
I want to built a class that will make calculation with f(x) and f(y) for example f(x)/f(y) but i have no idea how to use inside a class the class ReplaceAll or the sympy module subs



class myclass(Builtin):
    
    def apply(self,expr,var,evaluation):
        'sub[expr_,var_]'
        sympy_expr=expr.to_sympy()
        sympy_var=var.to_sympy()
        result=ReplaceAll((sympy_expr),'x->y',True)
        """
        calculations
        """
        return something

Ofcourse I have an implement error 
Have someone an idea how to implement ReplaceAll in my code
Thank you in advance
Reply all
Reply to author
Forward
0 new messages