<p dir="auto">Almost all the doc examples in numpy.polynomial.polynomial begin with<br>
&gt;&gt;&gt; import numpy.polynomial as P<br>
but it should actually be:<br>
&gt;&gt;&gt; import numpy.polynomial.polynomial as P</p>
<p dir="auto">In most of the functions in polynomial.polynomial you can read this line:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; from numpy import polynomial as P"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; from numpy import polynomial as P
</code></pre></div>
<p dir="auto">and then:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; P.polyline(1,-1)
&gt;&gt;&gt; sum = P.polyadd(c1,c2); sum
&gt;&gt;&gt; P.polysub(c1,c2)
&gt;&gt;&gt; P.polyder(c) # (d/dx)(c) = 2 + 6x + 12x**2
[...]"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; P.polyline(1,-1)
&gt;&gt;&gt; sum = P.polyadd(c1,c2); sum
&gt;&gt;&gt; P.polysub(c1,c2)
&gt;&gt;&gt; P.polyder(c) # (d/dx)(c) = 2 + 6x + 12x**2
[...]
</code></pre></div>
<p dir="auto"><a href="https://github.com/numpy/numpy/blob/v1.7.1/numpy/polynomial/polynomial.py">https://github.com/numpy/numpy/blob/v1.7.1/numpy/polynomial/polynomial.py</a></p>
<p dir="auto">but <em>all</em> these lines fail because all those members are part of the polynomial module in the polynomial package. It should be therefore like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; P.polynomial.polyline(1,-1)
&gt;&gt;&gt; sum = P.polynomial.polyadd(c1,c2); sum
&gt;&gt;&gt; P.polynomial.polysub(c1,c2)
&gt;&gt;&gt; P.polynomial.polyder(c) # (d/dx)(c) = 2 + 6x + 12x**2
[...]"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; P.polynomial.polyline(1,-1)
&gt;&gt;&gt; sum = P.polynomial.polyadd(c1,c2); sum
&gt;&gt;&gt; P.polynomial.polysub(c1,c2)
&gt;&gt;&gt; P.polynomial.polyder(c) # (d/dx)(c) = 2 + 6x + 12x**2
[...]
</code></pre></div>
<p dir="auto">Nevertheless, this looks like a bit too long for me and I wonder if it would be possible to import some convenience functions using power series polynomials (polynomial.polyfit and things like that) directly into the polynomial package namespace.</p>
<p dir="auto">I wrote "polynomial" too many times already :)</p>