mvpa2.measures.searchlight.h5save

mvpa2.measures.searchlight.h5save(filename, data, name=None, mode='w', mkdir=True, **kwargs)

Stores arbitrary data in an HDF5 file.

This is a convenience wrapper around obj2hdf(). Please see its documentation for more details – especially the warnings!!

Parameters:

filename : str

Name of the file the data shall be stored in.

data : arbitrary

Instance of an object that shall be stored in the file.

name : str or None

Name of the object. In case of a complex object that cannot be stored natively without disassembling them, this is going to be a new group, otherwise the name of the dataset. If None, no new group is created.

mode : {‘r’, ‘r+’, ‘w’, ‘w-‘, ‘a’}

IO mode of the HDF5 file. See h5py.File documentation for more information.

mkdir : bool, optional

Create target directory if it does not exist yet.

**kwargs :

All additional arguments will be passed to h5py.Group.create_dataset. This could, for example, be compression='gzip'.