docstr: `ivy.Array` instance method variant of `ivy.can_cast`. This method
  simply wraps the function, and so the docstring for `ivy.can_cast` also
  applies to this method with minimal changes.
  
  Parameters
  ----------
  self
      input array from which to cast.
  to
      desired data type.
  
  Returns
  -------
  ret
      ``True`` if the cast can occur according to :ref:`type-promotion` rules;
      otherwise, ``False``.
  
  Examples
  --------
  >>> x = ivy.array([1., 2., 3.])
  >>> print(x.dtype)
  float32
  
  >>> x = ivy.array([4., 5., 6.])
  >>> print(x.can_cast(ivy.float64))
  True
docstr_tok: ["`","ivy.Array","`","instance","method","variant","of","`","ivy.can_cast","`",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","`","ivy.can_cast","`","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","input","array","from","which","to","cast",".","to","desired","data","type",".","Returns","--","--","--","-","ret","``","True","``","if","the","cast","can","occur","according","to",":","ref",":","`","type-promotion","`","rules",";","otherwise",",","``","False","``",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","1.",",","2.",",","3",".","]",")",">",">",">","print","(","x.dtype",")","float32",">",">",">","x","=","ivy.array","(","[","4.",",","5.",",","6",".","]",")",">",">",">","print","(","x.can_cast","(","ivy.float64",")",")","True"]
code: def can_cast(self: ivy.Array, to: ivy.Dtype) -> bool:
      """`ivy.Array` instance method variant of `ivy.can_cast`. This method
      simply wraps the function, and so the docstring for `ivy.can_cast` also
      applies to this method with minimal changes.
  
      Parameters
      ----------
      self
          input array from which to cast.
      to
          desired data type.
  
      Returns
      -------
      ret
          ``True`` if the cast can occur according to :ref:`type-promotion` rules;
          otherwise, ``False``.
  
      Examples
      --------
      >>> x = ivy.array([1., 2., 3.])
      >>> print(x.dtype)
      float32
  
      >>> x = ivy.array([4., 5., 6.])
      >>> print(x.can_cast(ivy.float64))
      True
      """
      return ivy.can_cast(self._data, to)
  
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 4 for calling the _ArrayWithDataTypes obj's underlying member method code with example usage: obj.can_cast(to) and returns: ivy