diff options
-rw-r--r-- | numpy/core/_add_newdocs_scalars.py | 5 | ||||
-rw-r--r-- | numpy/polynomial/_polybase.py | 3 | ||||
-rw-r--r-- | numpy/polynomial/chebyshev.py | 3 | ||||
-rw-r--r-- | numpy/polynomial/legendre.py | 6 | ||||
-rw-r--r-- | numpy/polynomial/polyutils.py | 18 |
5 files changed, 13 insertions, 22 deletions
diff --git a/numpy/core/_add_newdocs_scalars.py b/numpy/core/_add_newdocs_scalars.py index b9b151224..d31f0037d 100644 --- a/numpy/core/_add_newdocs_scalars.py +++ b/numpy/core/_add_newdocs_scalars.py @@ -6,6 +6,7 @@ platform-dependent information. from numpy.core import dtype from numpy.core import numerictypes as _numerictypes from numpy.core.function_base import add_newdoc +import platform ############################################################################## # @@ -49,6 +50,8 @@ possible_aliases = numeric_type_aliases([ ]) + + def add_newdoc_for_scalar_type(obj, fixed_aliases, doc): # note: `:field: value` is rST syntax which renders as field lists. o = getattr(_numerictypes, obj) @@ -56,7 +59,7 @@ def add_newdoc_for_scalar_type(obj, fixed_aliases, doc): character_code = dtype(o).char canonical_name_doc = "" if obj == o.__name__ else ":Canonical name: `numpy.{}`\n ".format(obj) alias_doc = ''.join(":Alias: `numpy.{}`\n ".format(alias) for alias in fixed_aliases) - alias_doc += ''.join(":Alias on this platform: `numpy.{}`: {}.\n ".format(alias, doc) + alias_doc += ''.join(":Alias on this platform ({} {}): `numpy.{}`: {}.\n ".format(platform.system(), platform.machine(), alias, doc) for (alias_type, alias, doc) in possible_aliases if alias_type is o) docstring = """ {doc} 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]) |