Load and save pickles
Load object from pickle file fname
Parameters: | fname : str
|
---|---|
Returns: | dix : object
|
Examples
dipy.io.pickles.save_pickle
Save dix to fname as pickle
Parameters: | fname : str
dix : str
|
---|
See also
Examples
>>> import os
>>> from tempfile import mkstemp
>>> fd, fname = mkstemp() # make temporary file (opened, attached to fh)
>>> d={0:{'d':1}}
>>> save_pickle(fname, d)
>>> d2=load_pickle(fname)
We remove the temporary file we created for neatness
>>> os.close(fd) # the file is still open, we need to close the fh
>>> os.remove(fname)