<p dir="auto">The doc/Makefile is becoming bitrotted.</p>
<ul dir="auto">
<li>Python 3.10 requires a recent version of setuptools to build NumPy, but recent versions do not install an executable easy_install, which is needed by the Makefile. Note that the module is available, the path to it just cannot be found.</li>
<li>If you have NumPy installed in the system, the path is not set correctly and the installed version will be used instead of the newly compiled version</li>
</ul>
<p dir="auto">These problems can be worked around, but perhaps it is time to look at a different build system/script. Using a virtual environment might be an easy fix, as pip could be used to install a wheel instead of using easy_install to install an egg and messing with the path.</p>
<p dir="auto">I would like to suggest updating <code class="notranslate">numpy.reciprocal</code> to be consistent with <code class="notranslate">numpy.divide</code> and Python 3's division operator by having it promote integer inputs to double. Currently, the <a href="https://numpy.org/doc/stable/reference/generated/numpy.reciprocal.html?highlight=reciprocal#numpy.reciprocal" rel="nofollow">docs for reciprocal</a> say it "is not designed to work with integers... because of the way Python handles integer division." This statement refers to Python 2, not 3, however.</p>
<h3 dir="auto">Today:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
a = np.array((1, 2, 3))
np.reciprocal(a)
: array([1, 0, 0])"><pre class="notranslate"><code class="notranslate">import numpy as np
a = np.array((1, 2, 3))
np.reciprocal(a)
: array([1, 0, 0])
</code></pre></div>
<h3 dir="auto">Proposed result:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="array([1., 0.5, 0.33333333])"><pre class="notranslate"><code class="notranslate">array([1., 0.5, 0.33333333])
</code></pre></div>
<p dir="auto">This would make <code class="notranslate">numpy.reciprocal(a)</code> equivalent to <code class="notranslate">(1 / a)</code>.</p>
<p dir="auto">cc <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></p>