<p dir="auto">I read <a href="https://github.com/JuliaLang/julia/pull/12563" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/12563/hovercard">this discussion</a> about <code class="notranslate">max</code> and <code class="notranslate">maximum</code> returning <code class="notranslate">NaN</code> when the collection includes <code class="notranslate">NaN</code>.  For example,</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; VERSION
v&quot;0.7.0-DEV.82&quot;

julia&gt; v = [1.0, NaN, 2.0]
3-element Array{Float64,1}:
   1.0
 NaN
   2.0

julia&gt; maximum(v)
NaN"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">VERSION</span>
<span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.7.0-DEV.82<span class="pl-pds">"</span></span>

julia<span class="pl-k">&gt;</span> v <span class="pl-k">=</span> [<span class="pl-c1">1.0</span>, <span class="pl-c1">NaN</span>, <span class="pl-c1">2.0</span>]
<span class="pl-c1">3</span><span class="pl-k">-</span>element Array{Float64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
   <span class="pl-c1">1.0</span>
 <span class="pl-c1">NaN</span>
   <span class="pl-c1">2.0</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">maximum</span>(v)
<span class="pl-c1">NaN</span></pre></div>
<p dir="auto">However,  <code class="notranslate">findmax</code> still returns the maximum among non-NaN values and its index:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; findmax(v)
(2.0, 3)"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">findmax</span>(v)
(<span class="pl-c1">2.0</span>, <span class="pl-c1">3</span>)</pre></div>
<p dir="auto">This seems inconsistent.  Is this something intended or a bug?</p>
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="248260512" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/23155" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/23155/hovercard" href="https://github.com/JuliaLang/julia/pull/23155">#23155</a>. These should be made to match and documentation updated accordingly.</p>