docstr: `ivy.Array` instance method variant of `ivy.dtype`. This method
  helps to get the data type of the array.
  
  Parameters
  ----------
  self
      The input array.
  as_native
      Whether to return the native data type of the array.
      If True, returns the native data type. Default is False.
  
  Returns
  -------
  ret
      The data type of the array. If as_native is True,
      returns the native data type.
  
  Examples
  --------
  >>> x = ivy.array([1, 2, 3])
  >>> y = x.dtype()
  >>> print(y)
  int32
  
  >>> x= ivy.array([1.0, 2.0, 3.0], dtype=ivy.float64)
  >>> y = x.dtype(as_native=True)
  >>> print(y)
  float64
docstr_tok: ["`","ivy.Array","`","instance","method","variant","of","`","ivy.dtype","`",".","This","method","helps","to","get","the","data","type","of","the","array",".","Parameters","--","--","--","--","--","self","The","input","array",".","as_native","Whether","to","return","the","native","data","type","of","the","array",".","If","True",",","returns","the","native","data","type",".","Default","is","False",".","Returns","--","--","--","-","ret","The","data","type","of","the","array",".","If","as_native","is","True",",","returns","the","native","data","type",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","1",",","2",",","3","]",")",">",">",">","y","=","x.dtype","(",")",">",">",">","print","(","y",")","int32",">",">",">","x=","ivy.array","(","[","1.0",",","2.0",",","3.0","]",",","dtype=ivy.float64",")",">",">",">","y","=","x.dtype","(","as_native=True",")",">",">",">","print","(","y",")","float64"]
code: def dtype(
      self: ivy.Array, as_native: bool = False
  ) -> Union[ivy.Dtype, ivy.NativeDtype]:
      """`ivy.Array` instance method variant of `ivy.dtype`. This method
      helps to get the data type of the array.
  
      Parameters
      ----------
      self
          The input array.
      as_native
          Whether to return the native data type of the array.
          If True, returns the native data type. Default is False.
  
      Returns
      -------
      ret
          The data type of the array. If as_native is True,
          returns the native data type.
  
      Examples
      --------
      >>> x = ivy.array([1, 2, 3])
      >>> y = x.dtype()
      >>> print(y)
      int32
  
      >>> x= ivy.array([1.0, 2.0, 3.0], dtype=ivy.float64)
      >>> y = x.dtype(as_native=True)
      >>> print(y)
      float64
      """
      return ivy.dtype(self._data, as_native=as_native)
  
file_path: ivy/ivy/data_classes/array/data_type.py
imports: import abc
  from typing import Tuple, Optional, List, Union
  import ivy
label_desc: Use image node_id 5 for calling the _ArrayWithDataTypes obj's underlying member method code with example usage: obj.dtype(as_native) and returns: ivy