diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/polynomial/laguerre.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/polynomial/laguerre.py b/numpy/polynomial/laguerre.py index b3f795b4f..c1db13215 100644 --- a/numpy/polynomial/laguerre.py +++ b/numpy/polynomial/laguerre.py @@ -132,10 +132,9 @@ def poly2lag(pol): """ [pol] = pu.as_series([pol]) - deg = len(pol) - 1 res = 0 - for i in range(deg, -1, -1): - res = lagadd(lagmulx(res), pol[i]) + for p in pol[::-1]: + res = lagadd(lagmulx(res), p) return res |