From 2aaf325dd7e1fae2a6cd6dc63031ccff040487c4 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 10 May 2023 08:56:41 -0500 Subject: DOC: Add symbol in docstring for classes derived from ABCPolyBase A 'symbol' argument was added in ABCPolyBase in 1.24 and documented there, but the docstrings for derived classes (e.g., Polynomial) were not updated. --- numpy/polynomial/chebyshev.py | 6 ++++++ numpy/polynomial/hermite.py | 6 ++++++ numpy/polynomial/hermite_e.py | 6 ++++++ numpy/polynomial/laguerre.py | 6 ++++++ numpy/polynomial/legendre.py | 6 ++++++ numpy/polynomial/polynomial.py | 6 ++++++ 6 files changed, 36 insertions(+) (limited to 'numpy') diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py index c663ffab0..efbe13e0c 100644 --- a/numpy/polynomial/chebyshev.py +++ b/numpy/polynomial/chebyshev.py @@ -2012,6 +2012,12 @@ class Chebyshev(ABCPolyBase): Window, see `domain` for its use. The default value is [-1, 1]. .. versionadded:: 1.6.0 + symbol : str, optional + Symbol used to represent the independent variable in string + representations of the polynomial expression, e.g. for printing. + The symbol must be a valid Python identifier. Default value is 'x'. + + .. versionadded:: 1.24 """ # Virtual Functions diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py index e20339121..210df25f5 100644 --- a/numpy/polynomial/hermite.py +++ b/numpy/polynomial/hermite.py @@ -1675,6 +1675,12 @@ class Hermite(ABCPolyBase): Window, see `domain` for its use. The default value is [-1, 1]. .. versionadded:: 1.6.0 + symbol : str, optional + Symbol used to represent the independent variable in string + representations of the polynomial expression, e.g. for printing. + The symbol must be a valid Python identifier. Default value is 'x'. + + .. versionadded:: 1.24 """ # Virtual Functions diff --git a/numpy/polynomial/hermite_e.py b/numpy/polynomial/hermite_e.py index 182c562c2..bdf29405b 100644 --- a/numpy/polynomial/hermite_e.py +++ b/numpy/polynomial/hermite_e.py @@ -1667,6 +1667,12 @@ class HermiteE(ABCPolyBase): Window, see `domain` for its use. The default value is [-1, 1]. .. versionadded:: 1.6.0 + symbol : str, optional + Symbol used to represent the independent variable in string + representations of the polynomial expression, e.g. for printing. + The symbol must be a valid Python identifier. Default value is 'x'. + + .. versionadded:: 1.24 """ # Virtual Functions diff --git a/numpy/polynomial/laguerre.py b/numpy/polynomial/laguerre.py index 2eacceced..925d4898e 100644 --- a/numpy/polynomial/laguerre.py +++ b/numpy/polynomial/laguerre.py @@ -1623,6 +1623,12 @@ class Laguerre(ABCPolyBase): Window, see `domain` for its use. The default value is [0, 1]. .. versionadded:: 1.6.0 + symbol : str, optional + Symbol used to represent the independent variable in string + representations of the polynomial expression, e.g. for printing. + The symbol must be a valid Python identifier. Default value is 'x'. + + .. versionadded:: 1.24 """ # Virtual Functions diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py index 028e2fe7b..8e9c19d94 100644 --- a/numpy/polynomial/legendre.py +++ b/numpy/polynomial/legendre.py @@ -1636,6 +1636,12 @@ class Legendre(ABCPolyBase): Window, see `domain` for its use. The default value is [-1, 1]. .. versionadded:: 1.6.0 + symbol : str, optional + Symbol used to represent the independent variable in string + representations of the polynomial expression, e.g. for printing. + The symbol must be a valid Python identifier. Default value is 'x'. + + .. versionadded:: 1.24 """ # Virtual Functions diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py index d102f5a30..ceadff0bf 100644 --- a/numpy/polynomial/polynomial.py +++ b/numpy/polynomial/polynomial.py @@ -1489,6 +1489,12 @@ class Polynomial(ABCPolyBase): Window, see `domain` for its use. The default value is [-1, 1]. .. versionadded:: 1.6.0 + symbol : str, optional + Symbol used to represent the independent variable in string + representations of the polynomial expression, e.g. for printing. + The symbol must be a valid Python identifier. Default value is 'x'. + + .. versionadded:: 1.24 """ # Virtual Functions -- cgit v1.2.1