<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1772" rel="nofollow">http://projects.scipy.org/numpy/ticket/1772</a> on 2011-03-15 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rgommers/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rgommers">@rgommers</a>, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pv">@pv</a>.</em></p>
<p dir="auto">The methods and attributes sections are wrong, because sphinx tries to import numpy.methodname instead of numpy.classname.methodname.  See numpy.chararray for example.</p>
<p dir="auto">This is probably a Sphinx bug (in autosummary/generate.py), but currently we duplicate/extend the autosummary class template in doc/source/reference/_templates. That class template should probably be completely removed anyway, this is fixed in Sphinx. I tried removing it, and the generated pdf got 20 pages longer while the number of warnings went from 1600 down to 800.</p>
<p dir="auto">Is this behavior expected?</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; print type(np.uint32(0) + int(0))
&lt;type 'numpy.int64'&gt;
&gt;&gt;&gt; print type(np.uint64(0) + int(0))
&lt;type 'numpy.float64'&gt;"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">print</span> <span class="pl-en">type</span>(<span class="pl-s1">np</span>.<span class="pl-en">uint32</span>(<span class="pl-c1">0</span>) <span class="pl-c1">+</span> <span class="pl-en">int</span>(<span class="pl-c1">0</span>))
<span class="pl-c1">&lt;</span><span class="pl-s1">type</span> <span class="pl-s">'numpy.int64'</span><span class="pl-c1">&gt;</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">print</span> <span class="pl-en">type</span>(<span class="pl-s1">np</span>.<span class="pl-en">uint64</span>(<span class="pl-c1">0</span>) <span class="pl-c1">+</span> <span class="pl-en">int</span>(<span class="pl-c1">0</span>))
<span class="pl-c1">&lt;</span><span class="pl-s1">type</span> <span class="pl-s">'numpy.float64'</span><span class="pl-c1">&gt;</span></pre></div>
<p dir="auto">The latter took me by surprise!</p>