diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-03-12 22:45:16 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-03-12 23:13:59 -0700 |
commit | 43c79ff448534e1d672e5c6013f9659d27d69aa0 (patch) | |
tree | 89d9b63028478412663a8ecbe881a7783e681516 /numpy/polynomial/chebyshev.py | |
parent | a9790fe223a15419c68aa1dd6ee6ab45ad4b96c8 (diff) | |
download | numpy-43c79ff448534e1d672e5c6013f9659d27d69aa0.tar.gz |
MAINT: Unify polynomial division functions
These division functions are all the same - the algorithm used does not care about the basis.
Note that while chebdiv and polydiv could be implemented in terms of this function, their current implementations are more optimal and exploit the properties of a multiplication by a basis polynomial.
Diffstat (limited to 'numpy/polynomial/chebyshev.py')
-rw-r--r-- | numpy/polynomial/chebyshev.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py index fd05280e9..0eef90177 100644 --- a/numpy/polynomial/chebyshev.py +++ b/numpy/polynomial/chebyshev.py @@ -793,6 +793,7 @@ def chebdiv(c1, c2): if c2[-1] == 0: raise ZeroDivisionError() + # note: this is more efficient than `pu._div(chebmul, c1, c2)` lc1 = len(c1) lc2 = len(c2) if lc1 < lc2: |