summaryrefslogtreecommitdiff
path: root/numpy/polynomial/chebyshev.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-03-12 22:47:47 -0700
committerEric Wieser <wieser.eric@gmail.com>2019-03-12 22:49:48 -0700
commita9790fe223a15419c68aa1dd6ee6ab45ad4b96c8 (patch)
tree90c92ee5a1c3799bc121b6d805495486b76b5ab8 /numpy/polynomial/chebyshev.py
parentfcea19a3dd586bbf9d62719de551ac75d3b4e17a (diff)
downloadnumpy-a9790fe223a15419c68aa1dd6ee6ab45ad4b96c8.tar.gz
MAINT: Adjust variable names for consistency
This makes the variable names in polydiv and chebdiv match polyutils._div. It also brings the order of the special-casing in line to match.
Diffstat (limited to 'numpy/polynomial/chebyshev.py')
-rw-r--r--numpy/polynomial/chebyshev.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py
index 8eb365de7..fd05280e9 100644
--- a/numpy/polynomial/chebyshev.py
+++ b/numpy/polynomial/chebyshev.py
@@ -225,15 +225,15 @@ def _zseries_div(z1, z2):
"""
z1 = z1.copy()
z2 = z2.copy()
- len1 = len(z1)
- len2 = len(z2)
- if len2 == 1:
+ lc1 = len(z1)
+ lc2 = len(z2)
+ if lc2 == 1:
z1 /= z2
return z1, z1[:1]*0
- elif len1 < len2:
+ elif lc1 < lc2:
return z1[:1]*0, z1
else:
- dlen = len1 - len2
+ dlen = lc1 - lc2
scl = z2[0]
z2 /= scl
quo = np.empty(dlen + 1, dtype=z1.dtype)
@@ -244,16 +244,16 @@ def _zseries_div(z1, z2):
quo[i] = z1[i]
quo[dlen - i] = r
tmp = r*z2
- z1[i:i+len2] -= tmp
- z1[j:j+len2] -= tmp
+ z1[i:i+lc2] -= tmp
+ z1[j:j+lc2] -= tmp
i += 1
j -= 1
r = z1[i]
quo[i] = r
tmp = r*z2
- z1[i:i+len2] -= tmp
+ z1[i:i+lc2] -= tmp
quo /= scl
- rem = z1[i+1:i-1+len2].copy()
+ rem = z1[i+1:i-1+lc2].copy()
return quo, rem