<p dir="auto">After <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="421618583" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/13134" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/13134/hovercard" href="https://github.com/numpy/numpy/pull/13134">#13134</a> is merged, <code class="notranslate">np.exp</code> and <code class="notranslate">np.log</code> return float32 arrays for float16 inputs.  Is the change intended?  I could not find docs for it (<a href="https://www.numpy.org/devdocs/reference/generated/numpy.exp.html" rel="nofollow">https://www.numpy.org/devdocs/reference/generated/numpy.exp.html</a>), while it is documented that <code class="notranslate">np.sum</code> casts ints to the default platform integer.</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
print(np.exp(np.array([1, 2], np.float16)).dtype)  # =&gt; float32
print(np.log(np.array([1, 2], np.float16)).dtype)  # =&gt; float32"><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-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">exp</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-s1">np</span>.<span class="pl-s1">float16</span>)).<span class="pl-s1">dtype</span>)  <span class="pl-c"># =&gt; float32</span>
<span class="pl-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">log</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>], <span class="pl-s1">np</span>.<span class="pl-s1">float16</span>)).<span class="pl-s1">dtype</span>)  <span class="pl-c"># =&gt; float32</span></pre></div>




<h3 dir="auto">Numpy/Python version information:</h3>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.17.0.dev0+64b3e67 3.7.1 (default, Nov  6 2018, 21:02:07)
[Clang 10.0.0 (clang-1000.10.44.4)]"><pre class="notranslate"><code class="notranslate">1.17.0.dev0+64b3e67 3.7.1 (default, Nov  6 2018, 21:02:07)
[Clang 10.0.0 (clang-1000.10.44.4)]
</code></pre></div>
<p dir="auto"><code class="notranslate">pip install numpy</code> on python 2.7 attempts to install numpy 1.17, which dropped python 2.7 support. This is contrary to the functionality described in <a href="https://www.numpy.org/neps/nep-0014-dropping-python2.7-proposal.html" rel="nofollow">NEP 14</a>, which states:</p>
<blockquote>
<p dir="auto">... <code class="notranslate">pip install numpy</code> on Python 2 will continue to give the last working release in perpetuity...</p>
</blockquote>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">pip version: 19.2.2<br>
python: 2.7.15 |Anaconda, Inc.| (default, Oct 23 2018, 18:31:10) \n[GCC 7.3.0]</p>