summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Bussonnier <bussonniermatthias@gmail.com>2021-01-28 09:11:14 -0800
committerMatthias Bussonnier <bussonniermatthias@gmail.com>2021-01-28 09:21:55 -0800
commitbb8990e5eba4927716ad8a93e9b92c0f3de69386 (patch)
tree5b8a5e2daa8754025d272a22c48d3473a29f1c81
parent7a4e602a1f9e39ec3662e21a12c35c6df0cf9295 (diff)
downloadnumpy-bb8990e5eba4927716ad8a93e9b92c0f3de69386.tar.gz
DOC: cleanup of numpy/polynomial.
Numpydoc format says that the colon need o be omitted if there is no type, there were also some empty Examples Sections
-rw-r--r--numpy/polynomial/_polybase.py3
-rw-r--r--numpy/polynomial/chebyshev.py3
-rw-r--r--numpy/polynomial/legendre.py6
-rw-r--r--numpy/polynomial/polyutils.py18
4 files changed, 9 insertions, 21 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py
index ef3f9896d..b04b8e66b 100644
--- a/numpy/polynomial/_polybase.py
+++ b/numpy/polynomial/_polybase.py
@@ -757,9 +757,6 @@ class ABCPolyBase(abc.ABC):
Conversion between domains and class types can result in
numerically ill defined series.
- Examples
- --------
-
"""
if kind is None:
kind = self.__class__
diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py
index 4d0a4f483..d24fc738f 100644
--- a/numpy/polynomial/chebyshev.py
+++ b/numpy/polynomial/chebyshev.py
@@ -1149,9 +1149,6 @@ def chebval(x, c, tensor=True):
-----
The evaluation uses Clenshaw recursion, aka synthetic division.
- Examples
- --------
-
"""
c = np.array(c, ndmin=1, copy=True)
if c.dtype.char in '?bBhHiIlLqQpP':
diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py
index 23ddd07ca..cd4da2a79 100644
--- a/numpy/polynomial/legendre.py
+++ b/numpy/polynomial/legendre.py
@@ -605,9 +605,6 @@ def legpow(c, pow, maxpower=16):
--------
legadd, legsub, legmulx, legmul, legdiv
- Examples
- --------
-
"""
return pu._pow(legmul, c, pow, maxpower)
@@ -890,9 +887,6 @@ def legval(x, c, tensor=True):
-----
The evaluation uses Clenshaw recursion, aka synthetic division.
- Examples
- --------
-
"""
c = np.array(c, ndmin=1, copy=False)
if c.dtype.char in '?bBhHiIlLqQpP':
diff --git a/numpy/polynomial/polyutils.py b/numpy/polynomial/polyutils.py
index d81ee9754..01879ecbc 100644
--- a/numpy/polynomial/polyutils.py
+++ b/numpy/polynomial/polyutils.py
@@ -509,7 +509,7 @@ def _fromroots(line_f, mul_f, roots):
The ``<type>line`` function, such as ``polyline``
mul_f : function(array_like, array_like) -> ndarray
The ``<type>mul`` function, such as ``polymul``
- roots :
+ roots
See the ``<type>fromroots`` functions for more detail
"""
if len(roots) == 0:
@@ -537,7 +537,7 @@ def _valnd(val_f, c, *args):
----------
val_f : function(array_like, array_like, tensor: bool) -> array_like
The ``<type>val`` function, such as ``polyval``
- c, args :
+ c, args
See the ``<type>val<n>d`` functions for more detail
"""
args = [np.asanyarray(a) for a in args]
@@ -567,7 +567,7 @@ def _gridnd(val_f, c, *args):
----------
val_f : function(array_like, array_like, tensor: bool) -> array_like
The ``<type>val`` function, such as ``polyval``
- c, args :
+ c, args
See the ``<type>grid<n>d`` functions for more detail
"""
for xi in args:
@@ -586,7 +586,7 @@ def _div(mul_f, c1, c2):
----------
mul_f : function(array_like, array_like) -> array_like
The ``<type>mul`` function, such as ``polymul``
- c1, c2 :
+ c1, c2
See the ``<type>div`` functions for more detail
"""
# c1, c2 are trimmed copies
@@ -646,7 +646,7 @@ def _fit(vander_f, x, y, deg, rcond=None, full=False, w=None):
----------
vander_f : function(array_like, int) -> ndarray
The 1d vander function, such as ``polyvander``
- c1, c2 :
+ c1, c2
See the ``<type>fit`` functions for more detail
"""
x = np.asarray(x) + 0.0
@@ -732,12 +732,12 @@ def _pow(mul_f, c, pow, maxpower):
Parameters
----------
- vander_f : function(array_like, int) -> ndarray
- The 1d vander function, such as ``polyvander``
- pow, maxpower :
- See the ``<type>pow`` functions for more detail
mul_f : function(array_like, array_like) -> ndarray
The ``<type>mul`` function, such as ``polymul``
+ c : array_like
+ 1-D array of array of series coefficients
+ pow, maxpower
+ See the ``<type>pow`` functions for more detail
"""
# c is a trimmed copy
[c] = as_series([c])