0
xnum = np.linspace(-5, 5, 1000)
a = -3
n = 0
d = (((x^2) / (10))+(np.sin(2*x) / (2)))
dfs = ta.derivatives(d, x, a, n)
ta.plotter(xnum, ta.taylor(xnum, a, dfs), d, a)

I am getting the error:

"TypeError: unsupported operand type(s) for /: 'Not' and 'int'" on my 6th line?

Taher A. Ghaleb
  • 5,120
  • 5
  • 31
  • 44

1 Answers1

1

I feel like its the line

d = (((x^2) / (10))+(np.sin(2*x) / (2)))

that's causing the trouble, power in python is not ^ (which is binary xor), you can use np.power or ** notation.

Kevin He
  • 1,210
  • 8
  • 19