docstr: ivy.Array instance method variant of ivy.to_device. This method
  simply wraps the function, and so the docstring for ivy.to_device also
  applies to this method with minimal changes.
  
  Parameters
  ----------
  self
      input array to be moved to the desired device
  device
      device to move the input array `x` to
  stream
      stream object to use during copy. In addition to the types
      supported in array.__dlpack__(), implementations may choose to
      support any library-specific stream object with the caveat that
      any code using such an object would not be portable.
  out
      optional output array, for writing the result to. It must have
      a shape that the inputs broadcast to.
  
  Examples
  --------
  >>> x = ivy.array([2, 5, 4, 1])
  >>> y = x.to_device('cpu')
  >>> print(y.device)
  cpu
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy.to_device",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.to_device","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","input","array","to","be","moved","to","the","desired","device","device","device","to","move","the","input","array","`","x","`","to","stream","stream","object","to","use","during","copy",".","In","addition","to","the","types","supported","in","array.__dlpack__","(",")",",","implementations","may","choose","to","support","any","library-specific","stream","object","with","the","caveat","that","any","code","using","such","an","object","would","not","be","portable",".","out","optional","output","array",",","for","writing","the","result","to",".","It","must","have","a","shape","that","the","inputs","broadcast","to",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","2",",","5",",","4",",","1","]",")",">",">",">","y","=","x.to_device","(","'cpu","'",")",">",">",">","print","(","y.device",")","cpu"]
code: def to_device(
      self: ivy.Array,
      device: Union[ivy.Device, ivy.NativeDevice],
      *,
      stream: Optional[Union[int, Any]] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """ivy.Array instance method variant of ivy.to_device. This method
      simply wraps the function, and so the docstring for ivy.to_device also
      applies to this method with minimal changes.
  
      Parameters
      ----------
      self
          input array to be moved to the desired device
      device
          device to move the input array `x` to
      stream
          stream object to use during copy. In addition to the types
          supported in array.__dlpack__(), implementations may choose to
          support any library-specific stream object with the caveat that
          any code using such an object would not be portable.
      out
          optional output array, for writing the result to. It must have
          a shape that the inputs broadcast to.
  
      Examples
      --------
      >>> x = ivy.array([2, 5, 4, 1])
      >>> y = x.to_device('cpu')
      >>> print(y.device)
      cpu
      """
      return ivy.to_device(self._data, device, stream=stream, out=out)
  
imports: import abc
  from typing import Union, Optional, Any
  import ivy
label_desc: Use image node_id 2 for calling the _ArrayWithDevice obj's underlying member method code with example usage: obj.to_device(device) and returns: ivy