I tried to calculate the numeric values of the result of the solve function. In WolframAlpha it is called "Approximate forms".
This are my equations:
>>> solve([Eq(u, r * i), Eq(p, u * i), Eq(p, 20), Eq(r, 4)])
[{i: -√5, p: 20, r: 4, u: -4⋅√5}, {i: √5, p: 20, r: 4, u: 4⋅√5}]
I tried N, but it does not seem to work:
>>> N(solve([Eq(u, r * i), Eq(p, u * i), Eq(p, 20), Eq(r, 4)]), 2)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/base/data/home/apps/s~sympy-live-hrd/66.426491309333028408/sympy/sympy/core/evalf.py", line 1544, in N
return sympify(x, rational=True).evalf(n, **options)
AttributeError: 'list' object has no attribute 'evalf'
What is the right syntax to do this?