code: def save(self, fname, compression='blosc'):
          
          if hasattr(self, 'dtype'):
              if 'list' in self.dtype:
                  data = np.array(self.data)
              elif 'df' in self.dtype:
                  data = {k: np.array(v).astype('str') for k, v in self.data.to_dict('list').items()}
              else:
                  data = self.data
  
          # put geo vars into a dict
          geo = {
              'data' : data,
              'xform_data' : np.array(self.xform_data),
              'reduce' : self.reduce,
              'align' : self.align,
              'normalize' : self.normalize,
              'semantic' : self.semantic,
              'corpus' : np.array(self.corpus) if isinstance(self.corpus, list) else self.corpus,
              'kwargs' : self.kwargs,
              'version' : self.version,
              'dtype' : self.dtype
          }
  
          # if extension wasn't included, add it
          if fname[-4:]!='.geo':
              fname+='.geo'
  
          # save
          dd.io.save(fname, geo, compression=compression)
docs: 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.
  
          compression : str
              The kind of compression to use.  See the deepdish documentation for
              options: http://deepdish.readthedocs.io/en/latest/api_io.html#deepdish.io.save