sympy/sympy — pull request #2520 by mattpap (2013-10-08 18:35:43+00:00)
Title: roots: Factor expression before using roots_quadratic()

Example:
```
In [1]: var('a')
Out[1]: a

In [2]: M = Matrix([[a, 0], [0, 1]])

In [3]: M.eigenvals()
Out[3]: {1: 1, a: 1}
```
Before it gave `{a/2 + sqrt((a - 1)**2)/2 + 1/2: 1, a/2 - sqrt((a - 1)**2)/2 + 1/2: 1}`.