<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [8]: a = np.uint64(2)

In [9]: b = a + 1

In [10]: type(b)
Out[10]: numpy.float64"><pre class="notranslate"><code class="notranslate">In [8]: a = np.uint64(2)

In [9]: b = a + 1

In [10]: type(b)
Out[10]: numpy.float64
</code></pre></div>
<p dir="auto">!</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>