docstr: ivy.Array instance method variant of ivy.argmax. This method simply
  wraps the function, and so the docstring for ivy.argmax also applies to
  this method with minimal changes.
  
  Parameters
  ----------
  self
      input array. Should have a numeric data type.
  axis
      axis along which to search. If None, the function must return the index of
      the maximum value of the flattened array. Default: ``None``.
  keepdims
      If this is set to True, the axes which are reduced are left in the result as
      dimensions with size one. With this option, the result will broadcast
      correctly against the array.
  dtype
      Optional data type of the output array.
  select_last_index
      If this is set to True, the index corresponding to the
      last occurrence of the maximum value will be returned.
  out
      If provided, the result will be inserted into this array. It should be of
      the appropriate shape and dtype.
  
  Returns
  -------
  ret
      if axis is None, a zero-dimensional array containing the index of the first
      occurrence of the maximum value; otherwise, a non-zero-dimensional array
      containing the indices of the maximum values. The returned array must have
      the default array index data type.
  
  Examples
  --------
  Using :class:`ivy.Array` instance method:
  
  >>> x = ivy.array([0., 1., 2.])
  >>> y = x.argmax()
  >>> print(y)
  ivy.array(2)
  
  >>> x = ivy.array([[1., -0., -1.], [-2., 3., 2.]])
  >>> y = x.argmax(axis=1)
  >>> print(y)
  ivy.array([0, 1])
  
  >>> x = ivy.array([[4., 0., -1.], [2., -3., 6]])
  >>> y = x.argmax(axis=1, keepdims=True)
  >>> print(y)
  ivy.array([[0], [2]])
  
  >>> x = ivy.array([[4., 0., -1.], [2., -3., 6]])
  >>> y = x.argmax(axis=1, dtype=ivy.int64)
  >>> print(y, y.dtype)
  ivy.array([0, 2]) int64
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy.argmax",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.argmax","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","input","array",".","Should","have","a","numeric","data","type",".","axis","axis","along","which","to","search",".","If","None",",","the","function","must","return","the","index","of","the","maximum","value","of","the","flattened","array",".","Default",":","``","None","``",".","keepdims","If","this","is","set","to","True",",","the","axes","which","are","reduced","are","left","in","the","result","as","dimensions","with","size","one",".","With","this","option",",","the","result","will","broadcast","correctly","against","the","array",".","dtype","Optional","data","type","of","the","output","array",".","select_last_index","If","this","is","set","to","True",",","the","index","corresponding","to","the","last","occurrence","of","the","maximum","value","will","be","returned",".","out","If","provided",",","the","result","will","be","inserted","into","this","array",".","It","should","be","of","the","appropriate","shape","and","dtype",".","Returns","--","--","--","-","ret","if","axis","is","None",",","a","zero-dimensional","array","containing","the","index","of","the","first","occurrence","of","the","maximum","value",";","otherwise",",","a","non-zero-dimensional","array","containing","the","indices","of","the","maximum","values",".","The","returned","array","must","have","the","default","array","index","data","type",".","Examples","--","--","--","--","Using",":","class",":","`","ivy.Array","`","instance","method",":",">",">",">","x","=","ivy.array","(","[","0.",",","1.",",","2",".","]",")",">",">",">","y","=","x.argmax","(",")",">",">",">","print","(","y",")","ivy.array","(","2",")",">",">",">","x","=","ivy.array","(","[","[","1.",",","-0.",",","-1",".","]",",","[","-2.",",","3.",",","2",".","]","]",")",">",">",">","y","=","x.argmax","(","axis=1",")",">",">",">","print","(","y",")","ivy.array","(","[","0",",","1","]",")",">",">",">","x","=","ivy.array","(","[","[","4.",",","0.",",","-1",".","]",",","[","2.",",","-3.",",","6","]","]",")",">",">",">","y","=","x.argmax","(","axis=1",",","keepdims=True",")",">",">",">","print","(","y",")","ivy.array","(","[","[","0","]",",","[","2","]","]",")",">",">",">","x","=","ivy.array","(","[","[","4.",",","0.",",","-1",".","]",",","[","2.",",","-3.",",","6","]","]",")",">",">",">","y","=","x.argmax","(","axis=1",",","dtype=ivy.int64",")",">",">",">","print","(","y",",","y.dtype",")","ivy.array","(","[","0",",","2","]",")","int64"]
code: def argmax(
      self: ivy.Array,
      /,
      *,
      axis: Optional[int] = None,
      keepdims: bool = False,
      dtype: Optional[Union[ivy.Dtype, ivy.NativeDtype]] = None,
      select_last_index: bool = False,
      out: Optional[ivy.Array] = None,
  ) -> Union[ivy.Array, int]:
      """ivy.Array instance method variant of ivy.argmax. This method simply
      wraps the function, and so the docstring for ivy.argmax also applies to
      this method with minimal changes.
  
      Parameters
      ----------
      self
          input array. Should have a numeric data type.
      axis
          axis along which to search. If None, the function must return the index of
          the maximum value of the flattened array. Default: ``None``.
      keepdims
          If this is set to True, the axes which are reduced are left in the result as
          dimensions with size one. With this option, the result will broadcast
          correctly against the array.
      dtype
          Optional data type of the output array.
      select_last_index
          If this is set to True, the index corresponding to the
          last occurrence of the maximum value will be returned.
      out
          If provided, the result will be inserted into this array. It should be of
          the appropriate shape and dtype.
  
      Returns
      -------
      ret
          if axis is None, a zero-dimensional array containing the index of the first
          occurrence of the maximum value; otherwise, a non-zero-dimensional array
          containing the indices of the maximum values. The returned array must have
          the default array index data type.
  
      Examples
      --------
      Using :class:`ivy.Array` instance method:
  
      >>> x = ivy.array([0., 1., 2.])
      >>> y = x.argmax()
      >>> print(y)
      ivy.array(2)
  
      >>> x = ivy.array([[1., -0., -1.], [-2., 3., 2.]])
      >>> y = x.argmax(axis=1)
      >>> print(y)
      ivy.array([0, 1])
  
      >>> x = ivy.array([[4., 0., -1.], [2., -3., 6]])
      >>> y = x.argmax(axis=1, keepdims=True)
      >>> print(y)
      ivy.array([[0], [2]])
  
      >>> x = ivy.array([[4., 0., -1.], [2., -3., 6]])
      >>> y = x.argmax(axis=1, dtype=ivy.int64)
      >>> print(y, y.dtype)
      ivy.array([0, 2]) int64
      """
      return ivy.argmax(
          self._data,
          axis=axis,
          keepdims=keepdims,
          dtype=dtype,
          select_last_index=select_last_index,
          out=out,
      )
  
file_path: ivy/ivy/data_classes/array/searching.py
imports: import abc
  from numbers import Number
  from typing import Optional, Union, Tuple
  import ivy
label_desc: Use image node_id 1 for calling the _ArrayWithSearching obj's underlying member method code with example usage: obj.argmax() and returns: ivy