Dans un notebook Jupyter:
1 2 3 4 5 6 7 8
| import numpy as np
from sympy import symbols
x,y,a = symbols('x,y,a')
x = a
y = a+1
q = x / y
print(q.subs({a:0.9}))
print(np.arctan(q.subs({a:0.9}))) |
donne:
0.473684210526316
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-8-4465ca6e7df6> in <module>
6 q = x / y
7 print(q.subs({a:0.9}))
----> 8 print(np.arctan(q.subs({a:0.9})))
AttributeError: 'Float' object has no attribute 'arctan'
où est l'erreur???
Merci par avance, car là je suis perdu...
Partager