<p dir="auto">The bit-wise <code class="notranslate">&amp;</code> operator works fine with all Numpy integer types, except <code class="notranslate">uint64</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [13]: np.int64(123) &amp; 0xffff
Out[13]: 123

In [14]: np.uint64(123) &amp; 0xffff
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/Volumes/Raptor/&lt;ipython-input-14-42f055b9f958&gt; in &lt;module&gt;()
----&gt; 1 np.uint64(123) &amp; 0xffff

TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'"><pre class="notranslate"><code class="notranslate">In [13]: np.int64(123) &amp; 0xffff
Out[13]: 123

In [14]: np.uint64(123) &amp; 0xffff
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/Volumes/Raptor/&lt;ipython-input-14-42f055b9f958&gt; in &lt;module&gt;()
----&gt; 1 np.uint64(123) &amp; 0xffff

TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'
</code></pre></div>
<p dir="auto">Even Python long integers can be used, so is there a reason why <code class="notranslate">np.uint64</code> cannot be used, or is it a bug?</p>
<p dir="auto">This is to gather and close some other issues.  The NEP 50 proposal would close it.  In many cases using int64 as the default Python integer for scalar operations (where we disable value-based logic) can be surprising</p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="10533985" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/2955" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/2955/hovercard" href="https://github.com/numpy/numpy/issues/2955">gh-2955</a> (bitwise_and)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66254462" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/5746" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/5746/hovercard" href="https://github.com/numpy/numpy/issues/5746">gh-5746</a> (comparison) although uint64 and int64 comparisons of course have still more issues (covered by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="389178680" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/12525" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/12525/hovercard" href="https://github.com/numpy/numpy/issues/12525">gh-12525</a>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7731593" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/2524" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/2524/hovercard" href="https://github.com/numpy/numpy/issues/2524">gh-2524</a> (bit shift operators)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="216032133" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/8809" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/8809/hovercard" href="https://github.com/numpy/numpy/issues/8809">gh-8809</a> power is surprising for promotion (which is just the normal madness of scalar+value-based logic), again together with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="389178680" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/12525" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/12525/hovercard" href="https://github.com/numpy/numpy/issues/12525">gh-12525</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="415655775" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/13057" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/13057/hovercard" href="https://github.com/numpy/numpy/issues/13057">gh-13057</a> (division of uint by Python int)</li>
</ul>
<p dir="auto">This issue is just to gather and close the other ones as duplicates.</p>