parameters: (a, axis=None)
return_statement: return res
docstring: Return the indices of the maximum values in the specified axis ignoring
      NaNs. For all-NaN slices ``ValueError`` is raised. Warning: the
      results cannot be trusted if a slice contains only NaNs and -Infs.
  
  
      Parameters
      ----------
      a : array_like
          Input data.
      axis : int, optional
          Axis along which to operate.  By default flattened input is used.
  
      Returns
      -------
      index_array : ndarray
          An array of indices or a single index value.
  
      See Also
      --------
      argmax, nanargmin
  
      Examples
      --------
      >>> a = np.array([[np.nan, 4], [2, 3]])
      >>> np.argmax(a)
      0
      >>> np.nanargmax(a)
      1
      >>> np.nanargmax(a, axis=0)
      array([1, 0])
      >>> np.nanargmax(a, axis=1)
      array([1, 1])
docstring_summary: Return the indices of the maximum values in the specified axis ignoring
      NaNs. For all-NaN slices ``ValueError`` is raised. Warning: the
      results cannot be trusted if a slice contains only NaNs and -Infs.
docstring_tokens: Return the indices of the maximum values in the specified axis ignoring NaNs . For all - NaN slices ValueError is raised . Warning : the results cannot be trusted if a slice contains only NaNs and - Infs .
function: def nanargmax(a, axis=None):
      """
      Return the indices of the maximum values in the specified axis ignoring
      NaNs. For all-NaN slices ``ValueError`` is raised. Warning: the
      results cannot be trusted if a slice contains only NaNs and -Infs.
  
  
      Parameters
      ----------
      a : array_like
          Input data.
      axis : int, optional
          Axis along which to operate.  By default flattened input is used.
  
      Returns
      -------
      index_array : ndarray
          An array of indices or a single index value.
  
      See Also
      --------
      argmax, nanargmin
  
      Examples
      --------
      >>> a = np.array([[np.nan, 4], [2, 3]])
      >>> np.argmax(a)
      0
      >>> np.nanargmax(a)
      1
      >>> np.nanargmax(a, axis=0)
      array([1, 0])
      >>> np.nanargmax(a, axis=1)
      array([1, 1])
  
      """
      a, mask = _replace_nan(a, -np.inf)
      res = np.argmax(a, axis=axis)
      if mask is not None:
          mask = np.all(mask, axis=axis)
          if np.any(mask):
              raise ValueError("All-NaN slice encountered")
      return res
function_tokens: def nanargmax ( a , axis = None ) : a , mask = _replace_nan ( a , - np . inf ) res = np . argmax ( a , axis = axis ) if mask is not None : mask = np . all ( mask , axis = axis ) if np . any ( mask ) : raise ValueError ( "All-NaN slice encountered" ) return res