docstr: ivy.Array instance method variant of to_file. Write array to a file
  as text or binary. The data is always written in 'C' order.
  
  Parameters
  ----------
  self : ivy.Array
      Input array.
  fid : str, bytes, int
      An open file object, or a string containing a filename.
  sep : str, optional
      Separator between array items for text output.
      If '', a binary file is written.
  format_ : str, optional
      Format string for text file output.
  
  Returns
  -------
  None
  
  Examples
  --------
  With ivy.Array instance method:
  
  >>> x = ivy.array([1, 2, 3])
  >>> x.to_file('data.txt', sep=',', format_='%d')
  
  Notes
  -----
  The data produced by this method can be recovered using
  appropriate methods or functions depending on the data type.
docstr_tok: ["ivy.Array","instance","method","variant","of","to_file",".","Write","array","to","a","file","as","text","or","binary",".","The","data","is","always","written","in","'","C","'","order",".","Parameters","--","--","--","--","--","self",":","ivy.Array","Input","array",".","fid",":","str",",","bytes",",","int","An","open","file","object",",","or","a","string","containing","a","filename",".","sep",":","str",",","optional","Separator","between","array","items","for","text","output",".","If","``",",","a","binary","file","is","written",".","format_",":","str",",","optional","Format","string","for","text","file","output",".","Returns","--","--","--","-","None","Examples","--","--","--","--","With","ivy.Array","instance","method",":",">",">",">","x","=","ivy.array","(","[","1",",","2",",","3","]",")",">",">",">","x.to_file","(","'data.txt","'",",","sep=","'",",","'",",","format_=","'","%","d","'",")","Notes","--","--","-","The","data","produced","by","this","method","can","be","recovered","using","appropriate","methods","or","functions","depending","on","the","data","type","."]
code: def to_file(
      self: ivy.Array,
      fid: Union[str, bytes, int],
      sep: str = "",
      format_: str = "%s",
  ) -> None:
      """ivy.Array instance method variant of to_file. Write array to a file
      as text or binary. The data is always written in 'C' order.
  
      Parameters
      ----------
      self : ivy.Array
          Input array.
      fid : str, bytes, int
          An open file object, or a string containing a filename.
      sep : str, optional
          Separator between array items for text output.
          If '', a binary file is written.
      format_ : str, optional
          Format string for text file output.
  
      Returns
      -------
      None
  
      Examples
      --------
      With ivy.Array instance method:
  
      >>> x = ivy.array([1, 2, 3])
      >>> x.to_file('data.txt', sep=',', format_='%d')
  
      Notes
      -----
      The data produced by this method can be recovered using
      appropriate methods or functions depending on the data type.
      """
      return ivy.to_file(self, fid, sep, format_)
  
imports: import abc
  import numpy
  from numbers import Number
  from typing import Any, Iterable, Union, Optional, Dict, Callable, List, Tuple
  import ivy
label_desc: Use image node_id 15 for calling the _ArrayWithGeneral obj's underlying member method code with example usage: obj.to_file(fid, sep, format_) and returns: ivy