<p dir="auto">Numpy amax method raises warning when input is an array that contains NaN. I do not recall that numpy did this in previous versions. Also, from the documentation, it says that amax shall propagate NaN, so I would expect it to return NaN without raising a warning.</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
b = np.arange(5, dtype=float)
b[2] = np.NaN
np.amax(b)"><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">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">5</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">float</span>)
<span class="pl-s1">b</span>[<span class="pl-c1">2</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-v">NaN</span>
<span class="pl-s1">np</span>.<span class="pl-en">amax</span>(<span class="pl-s1">b</span>)</pre></div>
<p dir="auto">NaN is returned, as expected, but a RuntimeWarning is issued, which I did not expect.</p>

<h3 dir="auto">Error message:</h3>
<p dir="auto">C:\Python\WinPython\WPy-3710\python-3.7.1.amd64\lib\site-packages\numpy\core_methods.py:26: RuntimeWarning: invalid value encountered in reduce return umr_maximum(a, axis, None, out, keepdims)</p>


<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">1.14.6 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)]</p>
<p dir="auto"><code class="notranslate">numpy.maximum</code> now raises a RuntimeWarning when encountering a NaN, but the documentation says it propagates NaNs and even goes to the trouble of saying exactly how they are propagated, which makes it seem like it shouldn't give a warning.</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="In [1]: import numpy as np

In [2]: x = np.array([1, 2, np.nan], dtype=float)

In [3]: np.maximum(x, x)
/home/tudor/anaconda3/bin/ipython:1: RuntimeWarning: invalid value encountered in maximum
  #!/home/tudor/anaconda3/bin/python
Out[3]: array([ 1.,  2., nan])
"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">x</span> <span class="pl-c1">=</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">nan</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">float</span>)

<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">np</span>.<span class="pl-en">maximum</span>(<span class="pl-s1">x</span>, <span class="pl-s1">x</span>)
<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">tudor</span><span class="pl-c1">/</span><span class="pl-s1">anaconda3</span><span class="pl-c1">/</span><span class="pl-s1">bin</span><span class="pl-c1">/</span><span class="pl-s1">ipython</span>:<span class="pl-c1">1</span>: <span class="pl-v">RuntimeWarning</span>: <span class="pl-s1">invalid</span> <span class="pl-s1">value</span> <span class="pl-s1">encountered</span> <span class="pl-c1">in</span> <span class="pl-s1">maximum</span>
  <span class="pl-c">#!/home/tudor/anaconda3/bin/python</span>
<span class="pl-v">Out</span>[<span class="pl-c1">3</span>]: <span class="pl-en">array</span>([ <span class="pl-c1">1.</span>,  <span class="pl-c1">2.</span>, <span class="pl-s1">nan</span>])</pre></div>
<h3 dir="auto">Numpy/Python version information:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [6]: import sys, numpy; print(numpy.__version__, sys.version)
1.15.1 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 17:14:51)
[GCC 7.2.0]"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">6</span>]: <span class="pl-s1">import</span> <span class="pl-s1">sys</span>, <span class="pl-s1">numpy</span>; <span class="pl-en">print</span>(<span class="pl-s1">numpy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s1">sys</span>.<span class="pl-s1">version</span>)
<span class="pl-c1">1.15</span>.<span class="pl-c1">1</span> <span class="pl-c1">3.6</span>.<span class="pl-c1">6</span> <span class="pl-c1">|</span><span class="pl-v">Anaconda</span> <span class="pl-s1">custom</span> (<span class="pl-c1">64</span><span class="pl-c1">-</span><span class="pl-s1">bit</span>)<span class="pl-c1">|</span> (<span class="pl-s1">default</span>, <span class="pl-v">Jun</span> <span class="pl-c1">28</span> <span class="pl-c1">2018</span>, <span class="pl-c1">17</span>:<span class="pl-c1">14</span>:<span class="pl-c1">51</span>)
[<span class="pl-v">GCC</span> <span class="pl-c1">7.2</span><span class="pl-c1">.0</span>]</pre></div>