From 1f79addc9d546690984896fc4a35298aab289ba5 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 19 Jun 2015 21:52:25 -0400 Subject: MAINT: improve laguerre and legendre efficiency --- numpy/polynomial/laguerre.py | 3 +-- numpy/polynomial/legendre.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'numpy/polynomial') 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 e97de703f..c91cb72ec 100644 --- a/numpy/polynomial/legendre.py +++ b/numpy/polynomial/legendre.py @@ -1712,7 +1712,6 @@ def leggauss(deg): c = np.array([0]*deg + [1]) m = legcompanion(c) x = la.eigvalsh(m) - x.sort() # improve roots by one application of Newton dy = legval(x, c) -- cgit v1.2.1