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

        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.
        
hypertools/datageometry.py