summaryrefslogtreecommitdiff
path: root/numpy/polynomial/__init__.py
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2021-04-15 14:40:21 +0200
committerBas van Beek <b.f.van.beek@vu.nl>2021-04-15 14:45:50 +0200
commitcfbcd38558045197eded5cb84b8c8fe006a77480 (patch)
tree2e9ed21200c1357c85354406d7134036a3c3d73e /numpy/polynomial/__init__.py
parent181f273a59744d58f90f45d953a3285484c72cba (diff)
downloadnumpy-cfbcd38558045197eded5cb84b8c8fe006a77480.tar.gz
ENH: Add `__all__` to a number of public modules
Diffstat (limited to 'numpy/polynomial/__init__.py')
-rw-r--r--numpy/polynomial/__init__.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/numpy/polynomial/__init__.py b/numpy/polynomial/__init__.py
index d629df29f..4b4361163 100644
--- a/numpy/polynomial/__init__.py
+++ b/numpy/polynomial/__init__.py
@@ -37,13 +37,13 @@ This eliminates the need to navigate to the corresponding submodules, e.g.
The classes provide a more consistent and concise interface than the
type-specific functions defined in the submodules for each type of polynomial.
For example, to fit a Chebyshev polynomial with degree ``1`` to data given
-by arrays ``xdata`` and ``ydata``, the
+by arrays ``xdata`` and ``ydata``, the
`~chebyshev.Chebyshev.fit` class method::
>>> from numpy.polynomial import Chebyshev
>>> c = Chebyshev.fit(xdata, ydata, deg=1)
-is preferred over the `chebyshev.chebfit` function from the
+is preferred over the `chebyshev.chebfit` function from the
``np.polynomial.chebyshev`` module::
>>> from numpy.polynomial.chebyshev import chebfit
@@ -76,7 +76,7 @@ Methods for creating polynomial instances.
- ``Poly.basis(degree)`` -- Basis polynomial of given degree
- ``Poly.identity()`` -- ``p`` where ``p(x) = x`` for all ``x``
-- ``Poly.fit(x, y, deg)`` -- ``p`` of degree ``deg`` with coefficients
+- ``Poly.fit(x, y, deg)`` -- ``p`` of degree ``deg`` with coefficients
determined by the least-squares fit to the data ``x``, ``y``
- ``Poly.fromroots(roots)`` -- ``p`` with specified roots
- ``p.copy()`` -- Create a copy of ``p``
@@ -120,6 +120,16 @@ from .hermite import Hermite
from .hermite_e import HermiteE
from .laguerre import Laguerre
+__all__ = [
+ "set_default_printstyle",
+ "polynomial", "Polynomial",
+ "chebyshev", "Chebyshev",
+ "legendre", "Legendre",
+ "hermite", "Hermite",
+ "hermite_e", "HermiteE",
+ "laguerre", "Laguerre",
+]
+
def set_default_printstyle(style):
"""