diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2010-05-21 05:36:01 +0000 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2010-05-21 05:36:01 +0000 |
commit | ee4a8d391e21fe41ba919b21e890348c64b5a0e7 (patch) | |
tree | 4218072db004d6bfec9f61b211b3450f84958970 /numpy/polynomial/polytemplate.py | |
parent | 2041434cbe99115c4c26a7910904769d9bca5c7b (diff) | |
download | numpy-ee4a8d391e21fe41ba919b21e890348c64b5a0e7.tar.gz |
ENH: Add degree method to the Chebyshev and Polynomial classes.
Diffstat (limited to 'numpy/polynomial/polytemplate.py')
-rw-r--r-- | numpy/polynomial/polytemplate.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/polynomial/polytemplate.py b/numpy/polynomial/polytemplate.py index 8314cecf9..424ce7f48 100644 --- a/numpy/polynomial/polytemplate.py +++ b/numpy/polynomial/polytemplate.py @@ -303,6 +303,10 @@ class $name(pu.PolyBase) : # Extra numeric functions. # + def degree(self) : + """The degree of the series.""" + return len(self) - 1 + def convert(self, domain=None, kind=None) : """Convert to different class and/or domain. |