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/polynomial.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/polynomial.py')
-rw-r--r-- | numpy/polynomial/polynomial.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py index 8c6b604d5..f63d9dd74 100644 --- a/numpy/polynomial/polynomial.py +++ b/numpy/polynomial/polynomial.py @@ -397,6 +397,7 @@ def polydiv(c1, c2): if c2[-1] == 0: raise ZeroDivisionError() + # note: this is more efficient than `pu._div(polymul, c1, c2)` lc1 = len(c1) lc2 = len(c2) if lc1 < lc2: |