class_docstr: Hypertools data object class
  
  A DataGeometry object contains the data, figure handles and transform
  functions used to create a plot.  Note: this class should not be called
  directly, but is used by the `hyp.plot` function to create a plot object.
  
  Parameters
  ----------
  
  fig : matplotlib.Figure
      The matplotlib figure handle for the plot
  
  ax : matplotlib.Axes
      The matplotlib axes handle for the plot
  
  line_ani : matplotlib.animation.FuncAnimation
      The matplotlib animation handle (if the plot is an animation)
  
  data : list
      A list of numpy arrays representing the raw data
  
  xform_data : list
      A list of numpy arrays representing the transformed data
  
  reduce : dict
      A dictionary containing the reduction model and parameters
  
  align : dict
      A dictionary containing align model and parameters
  
  normalize : str
      A string representing the kind of normalization
  
  kwargs : dict
      A dictionary containing all kwargs passed to the plot function
  
  version : str
      The version of the software used to create the class instance
class_docstr_tok: ["Hypertools","data","object","class","A","DataGeometry","object","contains","the","data",",","figure","handles","and","transform","functions","used","to","create","a","plot",".","Note",":","this","class","should","not","be","called","directly",",","but","is","used","by","the","`","hyp.plot","`","function","to","create","a","plot","object",".","Parameters","--","--","--","--","--","fig",":","matplotlib.Figure","The","matplotlib","figure","handle","for","the","plot","ax",":","matplotlib.Axes","The","matplotlib","axes","handle","for","the","plot","line_ani",":","matplotlib.animation.FuncAnimation","The","matplotlib","animation","handle","(","if","the","plot","is","an","animation",")","data",":","list","A","list","of","numpy","arrays","representing","the","raw","data","xform_data",":","list","A","list","of","numpy","arrays","representing","the","transformed","data","reduce",":","dict","A","dictionary","containing","the","reduction","model","and","parameters","align",":","dict","A","dictionary","containing","align","model","and","parameters","normalize",":","str","A","string","representing","the","kind","of","normalization","kwargs",":","dict","A","dictionary","containing","all","kwargs","passed","to","the","plot","function","version",":","str","The","version","of","the","software","used","to","create","the","class","instance"]
docstr: Save method for the data geometry object
  
  The data will be saved as a 'geo' file, which is a dictionary containing
  the elements of a data geometry object saved in the hd5 format using
  `deepdish`.
  
  Parameters
  ----------
  fname : str
      A name for the file.  If the file extension (.geo) is not specified,
      it will be appended.
docstr_tok: ["Save","method","for","the","data","geometry","object","The","data","will","be","saved","as","a","'geo","'","file",",","which","is","a","dictionary","containing","the","elements","of","a","data","geometry","object","saved","in","the","hd5","format","using","`","deepdish","`",".","Parameters","--","--","--","--","--","fname",":","str","A","name","for","the","file",".","If","the","file","extension","(",".geo",")","is","not","specified",",","it","will","be","appended","."]
code: def save(self, fname, compression=None):
      """
      Save method for the data geometry object
  
      The data will be saved as a 'geo' file, which is a dictionary containing
      the elements of a data geometry object saved in the hd5 format using
      `deepdish`.
  
      Parameters
      ----------
      fname : str
          A name for the file.  If the file extension (.geo) is not specified,
          it will be appended.
      """
      if compression is not None:
          warnings.warn(
              "Hypertools has switched from deepdish to pickle "
              "for saving DataGeomtry objects. 'compression' "
              "argument has no effect and will be removed in a "
              "future version",
              FutureWarning,
          )
  
      # automatically add extension if not present
      if not fname.endswith(".geo"):
          fname += ".geo"
  
      # can't save/restore matplotlib objects across sessions
      curr_fig = self.fig
      curr_ax = self.ax
      curr_line_ani = self.line_ani
  
      curr_data = self.data
      # convert pandas DataFrames to dicts of
      # {column_name: list(column_values)} to fix I/O compatibility
      # issues across certain pandas versions. Expected self.data
      # format is restored by hypertools.load
      if isinstance(curr_data, pd.DataFrame):
          data_out_fmt = curr_data.to_dict("list")
      else:
          data_out_fmt = curr_data
  
      try:
          self.fig = self.ax = self.line_ani = None
          self.data = data_out_fmt
          # save
          with open(fname, "wb") as f:
              pickle.dump(self, f)
      finally:
          # make sure we don't mutate attribute values whether or not
          # save was successful
          self.fig = curr_fig
          self.ax = curr_ax
          self.line_ani = curr_line_ani
          self.data = curr_data
  
file_path: hypertools/hypertools/datageometry.py
imports: import copy
  import pickle
  import warnings
  import pandas
  from .tools.normalize import normalize
  from .tools.reduce import reduce
  from .tools.align import align
  from .tools.format_data import format_data
  from ._shared.helpers import convert_text, get_dtype
  from .config import __version__
label_desc: Use image node_id 6 for calling the DataGeometry obj's underlying member method code with example usage: obj.save(fname, compression) without return types