Commit f1ab9a01 authored by Manuel Günther's avatar Manuel Günther

Started documenting

parent 5348018d
from .utils import *
from . import preprocessor
from . import extractor
from . import algorithm
from . import utils
from . import test
def get_config():
......
from .LRPCA import LRPCA
from .LDAIR import LDAIR
# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in dir() if not _.startswith('_')]
from .LRPCA import LRPCA
from .LDAIR import LDAIR
# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in dir() if not _.startswith('_')]
from .LRPCA import LRPCA
from .LDAIR import LDAIR
# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in dir() if not _.startswith('_')]
......@@ -21,9 +21,40 @@ import pickle
import bob.io.base
def load_pickle(file_like):
"""load_pickle(file_like) -> data
Loads a file that was written with the :py:func:`save_pickle` function and returns its content.
**Keyword Parameters**
file_like: :py:class:`bob.io.base.HDF5File` or :py:class:`str`
The file containing the data to be read.
**Returns***
data : various types
The data read from the file.
"""
hdf5 = file_like if isinstance(file_like, bob.io.base.HDF5File) else bob.io.base.HDF5File(file_like)
return pickle.loads(hdf5.get("Data"))
def save_pickle(data, file_like):
"""save_pickle(data, file_like) -> None
Saves the given data in the given file using the :py:mod:`pickle` module.
The data is first pickled into a string, which is written into the given file
**Keyword Parameters**
data : various types
The data write into the file.
The data type must support pickling.
file_like: :py:class:`bob.io.base.HDF5File` or :py:class:`str`
The file or the name of the file to write.
If ``file_like`` is of type :py:class:`bob.io.base.HDF5File`, it needs to be open for writing.
"""
hdf5 = file_like if isinstance(file_like, bob.io.base.HDF5File) else bob.io.base.HDF5File(file_like, 'w')
hdf5.set("Data", pickle.dumps(data))
......@@ -19,11 +19,36 @@ Python API
LRPCA
-----
.. automodule:: xfacereclib.extension.CSU.lrpca
.. autosummary::
bob.bio.csu.preprocessor.LRPCA
bob.bio.csu.extractor.LRPCA
bob.bio.csu.algorithm.LRPCA
LDA-IR
------
.. automodule:: xfacereclib.extension.CSU.ldair
.. autosummary::
bob.bio.csu.preprocessor.LDAIR
bob.bio.csu.extractor.LDAIR
bob.bio.csu.algorithm.LDAIR
Details
-------
Generic functions
+++++++++++++++++
.. automodule:: bob.bio.csu
Preprocessors
+++++++++++++
.. automodule:: bob.bio.csu.preprocessor
Extractors
++++++++++
.. automodule:: bob.bio.csu.extractor
Algorithms
++++++++++
.. automodule:: bob.bio.csu.algorithm
.. include:: links.rst
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment