replace ^ by ** for sympy