-
Anonymous
Я получаю сообщение об ошибке «Объект mul не может быть вызван».
Сообщение
Anonymous »
Код: Выделить всё
import sympy as sp
def taylorCoefficient(f, a, n):
x = sp.symbols("x")
coefficient = []
for i in range(0, n + 1):
afgeleide = sp.diff(f(x), x, n=n)
def f(x0): return afgeleide.subs(x, x0)
coefficient += f(a) / sp.factorial(n)
return coefficient
x = sp.symbols("x")
taylorCoefficient(x ** 2 * sp.sin(x / 2), 0, 3)
Я получаю, что объект mul не может быть вызван, но почему? (Онлайн afgeleide=...)
Подробнее здесь:
https://stackoverflow.com/questions/470 ... able-error
1771815735
Anonymous
[code]import sympy as sp
def taylorCoefficient(f, a, n):
x = sp.symbols("x")
coefficient = []
for i in range(0, n + 1):
afgeleide = sp.diff(f(x), x, n=n)
def f(x0): return afgeleide.subs(x, x0)
coefficient += f(a) / sp.factorial(n)
return coefficient
x = sp.symbols("x")
taylorCoefficient(x ** 2 * sp.sin(x / 2), 0, 3)
[/code]
Я получаю, что объект mul не может быть вызван, но почему? (Онлайн afgeleide=...)
Подробнее здесь: [url]https://stackoverflow.com/questions/47023576/im-getting-a-mul-object-is-not-callable-error[/url]