diff options
Diffstat (limited to 'numpy/polynomial')
-rw-r--r-- | numpy/polynomial/laguerre.py | 3 | ||||
-rw-r--r-- | numpy/polynomial/legendre.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/numpy/polynomial/laguerre.py b/numpy/polynomial/laguerre.py index 8d2705d5d..fffe9e6b6 100644 --- a/numpy/polynomial/laguerre.py +++ b/numpy/polynomial/laguerre.py @@ -1688,8 +1688,7 @@ def laggauss(deg): # matrix is symmetric in this case in order to obtain better zeros. c = np.array([0]*deg + [1]) m = lagcompanion(c) - x = la.eigvals(m) - x.sort() + x = la.eigvalsh(m) # improve roots by one application of Newton dy = lagval(x, c) diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py index d2de28269..c91cb72ec 100644 --- a/numpy/polynomial/legendre.py +++ b/numpy/polynomial/legendre.py @@ -1711,8 +1711,7 @@ def leggauss(deg): # matrix is symmetric in this case in order to obtain better zeros. c = np.array([0]*deg + [1]) m = legcompanion(c) - x = la.eigvals(m) - x.sort() + x = la.eigvalsh(m) # improve roots by one application of Newton dy = legval(x, c) |