I use Numpy to get polynomial roots. Numpy provides a polynomial module.
My hand calculates for 'x * 2 + 5 * x + 6 = 0' * is 'x = -2' and 'x = -3'. (Simple)
But my code shows me the wrong answer: array ([- 0.5, -0.33333333]) (Inversed?)
Can anyone find the culprit in my code? Or is it just a mistake?
from numpy.polynomial import Polynomial as P p = P([1, 5, 6]) p.roots()
Fake howard
source share