Hi! I try to solve loglik with sympy. Here an example: from sympy import *
sigma2 = symbols('sigma2', real=True, positive=True) alpha, beta =symbols('alpha beta', real=True) k, n = symbols('k n', integer=True) Xk = Indexed('X', k) Yk = Indexed('Y', k) loglik = -1/2 * log(2*pi*sigma2) - 1/(2*sigma2) * Sum( (Yk - alpha - beta*Xk)**2, (k,1,n)) ldbeta = diff(loglik, beta) Now I try to >>>betahat = loglik.diff(beta).solve(beta) Traceback (most recent call last): File "<pyshell#114>", line 1, in <module> loglik.diff(beta).solve(beta) AttributeError: 'Mul' object has no attribute 'solve' but don't work. Ideas? -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/d86d0a68-143e-454b-8d30-d1d6ac4e0181%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.