Save the current Graph to a pickle.

        Parameters
        ----------
        path : str
            File path where the pickled object will be stored.
423489
def to_pickle(self, path):
        
        if int(sys.version.split(".")[1]) < 7 and isinstance(self, pygsp.graphs.Graph):
            # python 3.5, 3.6
            logger = self.logger
            self.logger = logger.name
        with open(path, 'wb') as f:
            pickle.dump(self, f)
        if int(sys.version.split(".")[1]) < 7 and isinstance(self, pygsp.graphs.Graph):
            self.logger = logger
262990
def save(self, path):
        
        with open(path, 'w') as f:
            f.write(self.contents())
354349
def save(self, path: str):
        
        with open(path, 'wb') as out:
            np.save(out, self.lex)
        logger.info("Saved top-k lexicon to \"%s\"", path)
820519
def __load(self, path):
        """"""
        try:
            path = os.path.abspath(path)
            with open(path, 'rb') as df:
                # loaded_dataset = pickle.load(df)
                self.__data, self.__classes, self.__labels, \
                self.__dtype, self.__description, \
                self.__num_features, self.__feature_names = pickle.load(df)

            # ensure the loaded dataset is valid
            self.__validate(self.__data, self.__classes, self.__labels)

        except IOError as ioe:
            raise IOError('Unable to read the dataset from file: {}', format(ioe))
        except:
            raise
74558
def save(self, path):
        
        with open(path, 'wb') as f:
            f.write(self.data)
208363
def save_to_path(self, file_path, chunk_size=DOWNLOAD_FILE_CHUNK_SIZE):
        
        response = self._get_download_response()
        with open(file_path, 'wb') as f:
            for chunk in response.iter_content(chunk_size=chunk_size):
                if chunk:  # filter out keep-alive new chunks
                    f.write(chunk)
319378
def load_model(self, path):
        
        with open(path, "rb") as in_file:
            self.__dict__.update(dill.load(in_file).__dict__)
394793
def serialize(self, path):
        
        pickle.dump([self.x, self.y_raw], file(path, 'w'))
321781
def to_json(self, path: Optional[str] = None, **kwargs) -> str:
        
        from .io import save_json
        return save_json(self, path, **kwargs)
381948
def _pickle_load(path):
        
        _, ext = os.path.splitext(path)
        topology = None
        if sys.version_info.major == 2:
            if ext == '.pickle2':
                with open(path, 'rb') as f:
                    topology = pickle.load(f)
            elif ext in ('.pickle3', '.pickle'):
                with open(path, 'rb') as f:
                    topology = pickle.load(f, protocol=3)
        elif sys.version_info.major == 3:
            if ext == '.pickle2':
                with open(path, 'rb') as f:
                    topology = pickle.load(f)
            elif ext in ('.pickle3', '.pickle'):
                with open(path, 'rb') as f:
                    topology = pickle.load(f)
        if topology is None:
            raise ValueError('File {} is not compatible with this version'.format(path))
        return topology
1081377
def open(self, path):
        
        self.current.append(self.create(path))
        return self.current[-1]
93835
def save_results(self, path='.'):
        """"""
        with open(path, 'wb') as f:
            pickle.dump(self.results, f)
1045290
def save(self, path=None, encoding=None, eol=None):
        
        path = path or self.path
        encoding = encoding or self.encoding

        save_file = codecs.open(path, 'w+', encoding=encoding)
        self.write_into(save_file, eol=eol)
        save_file.close()
631662
def load(cls, path):
        ""
        itos = pickle.load(open(path, 'rb'))
        return cls(itos)
1306162
def path(self, path: str):
        

        path = path if path else ''
        self.pathName = os.path.join(path, self.name)
1223188
def blockingSave(self, path):
        
        self.tmp_dir_save_session = self.tmp_dir_session.join('block').mkdir()
        state = {'session': dict(self.opts),
                 'dialogs': self.dialogs.saveState()}
        self.saveThread.prepare('0', path, self.tmp_dir_session, state)
        self.sigSave.emit(self)
        self.saveThread.run()
566771
def read_raw(data_path):
    
    with open(data_path, 'rb') as f:
        data = pickle.load(f)
    return data