Skip to content
Snippets Groups Projects
Commit 3d6d2148 authored by Manuel Günther's avatar Manuel Günther Committed by Tiago de Freitas Pereira
Browse files

Using derived class BioFile.load functions as default for read_original_data

parent fdd1a334
No related branches found
No related tags found
1 merge request!37Issue 8 remove database configuration
......@@ -21,13 +21,13 @@ class Preprocessor:
read_original_data: callable
This function is used to read the original data from file.
It takes three inputs: A :py:class:`bob.bio.db.BioFile`, the original directory (as ``str``) and the original extension (as ``str``).
It takes three inputs: A :py:class:`bob.bio.db.BioFile` (or one of its derivatives), the original directory (as ``str``) and the original extension (as ``str``).
kwargs : ``key=value`` pairs
A list of keyword arguments to be written in the :py:meth:`__str__` function.
"""
def __init__(self, writes_data = True, read_original_data = bob.bio.db.BioFile.load, **kwargs):
def __init__(self, writes_data = True, read_original_data = lambda biofile,directory,extension : biofile.load(directory,extension), **kwargs):
# Each class needs to have a constructor taking
# all the parameters that are required for the preprocessing as arguments
self.writes_data = writes_data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment