summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorPax <13646646+paxcodes@users.noreply.github.com>2022-03-26 17:39:13 -0700
committerGitHub <noreply@github.com>2022-03-26 17:39:13 -0700
commitb516cc24ec81fbc093f080c126dba9f360ceca52 (patch)
tree341a11f4201bf38120cb4c73c95c76994f014770 /numpy
parent4790d3670446bc104b593355a8667e246ca3d9a7 (diff)
downloadnumpy-b516cc24ec81fbc093f080c126dba9f360ceca52.tar.gz
DOC: fix code sample for leg2poly (#21253)
The previous code sample throws an attribute error around `P.leg2poly()`. Since commit d41fc4d (2012), leg2poly is not exposed in np.polynomial, and need to be explicitly called from `legendre`. Fixes #20925
Diffstat (limited to 'numpy')
-rw-r--r--numpy/polynomial/legendre.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py
index 23a2c089a..028e2fe7b 100644
--- a/numpy/polynomial/legendre.py
+++ b/numpy/polynomial/legendre.py
@@ -185,7 +185,7 @@ def leg2poly(c):
>>> p = c.convert(kind=P.Polynomial)
>>> p
Polynomial([-1. , -3.5, 3. , 7.5], domain=[-1., 1.], window=[-1., 1.])
- >>> P.leg2poly(range(4))
+ >>> P.legendre.leg2poly(range(4))
array([-1. , -3.5, 3. , 7.5])