diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-06-19 22:53:55 -0400 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-06-19 22:53:55 -0400 |
commit | 95b2c24820759397695ece5f512e930e7c1712cf (patch) | |
tree | 297e25f2662bf5cb23ed7ed15a702a005c03e30e /numpy | |
parent | 52c8285f2603da718fa00d76de528d035c624dc9 (diff) | |
parent | 1f79addc9d546690984896fc4a35298aab289ba5 (diff) | |
download | numpy-95b2c24820759397695ece5f512e930e7c1712cf.tar.gz |
Merge pull request #5989 from argriffing/polynomial-improvements
MAINT: improve laguerre and legendre efficiency
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/polynomial/laguerre.py | 3 | ||||
-rw-r--r-- | numpy/polynomial/legendre.py | 1 |
2 files changed, 1 insertions, 3 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 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) |