<p dir="auto">I totally get why it is a cause for concern when adding to an int, but I feel like floor division by a positive should be expected to return an integer "safe".</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
np.uint64(0) // 4 "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</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-c1">4</span> </pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Out[2]: -0.0"><pre class="notranslate"><code class="notranslate">Out[2]: -0.0
</code></pre></div>
<p dir="auto">I guess since I need to divide by 4 I'll just bitshift, but this was kinda unexpected for me.</p>
<h3 dir="auto">Numpy/Python version information:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [3]: import sys, numpy; print(numpy.__version__, sys.version)                                                                                      
1.16.1 3.7.2 (default, Dec 29 2018, 06:19:36) 
[GCC 7.3.0]"><pre class="notranslate"><code class="notranslate">In [3]: import sys, numpy; print(numpy.__version__, sys.version)                                                                                      
1.16.1 3.7.2 (default, Dec 29 2018, 06:19:36) 
[GCC 7.3.0]
</code></pre></div>
<p dir="auto">installed through conda  / conda-forge</p>
<p dir="auto">xref: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66253604" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/5745" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/5745/hovercard" href="https://github.com/numpy/numpy/issues/5745">#5745</a></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>