title: Python: nanargmax version for ndarray
body: <p>I'm super new to Python. I have a multidimensional array which contains NaNs. How do I get the index of the maximum value in the array?</p>
  <p>I tried using numpy.nanargmax(), but it seems that I can't use nanargmax with an ndarray?</p>
  <pre><code>&gt;&gt;&gt; a=np.arange(24).reshape(6,4).astype('float')
  &gt;&gt;&gt; a
  array([[ 0.,  1.,  2.,  3.],
         [ 4.,  5.,  6.,  7.],
         [ 8.,  9., 10., 11.],
         [12., 13., 14., 15.],
         [16., 17., 18., 19.],
         [20., 21., 22., 23.]])
  &gt;&gt;&gt; a[5, 2]=np.NaN
  &gt;&gt;&gt; a.argmax()
  22
  &gt;&gt;&gt; a.argmin()
  22
  &gt;&gt;&gt; a.nanargmax()
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  AttributeError: 'numpy.ndarray' object has no attribute 'nanargmax'
  </code></pre>
  <p>Also, why are the indices &quot;flattened&quot;? Is there a way to have it return indices in the row x column format?</p>
  <p>Sorry for the stupid questions!</p>
  <p>Thank you,</p>
  <p>Mrinmayi</p>