From 3d6d2148c395738fc410199782b9587d08d82037 Mon Sep 17 00:00:00 2001 From: Manuel Gunther <siebenkopf@googlemail.com> Date: Thu, 8 Sep 2016 08:58:06 -0600 Subject: [PATCH] Using derived class BioFile.load functions as default for read_original_data --- bob/bio/base/preprocessor/Preprocessor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bob/bio/base/preprocessor/Preprocessor.py b/bob/bio/base/preprocessor/Preprocessor.py index a5b24e28..6ac4e9fc 100644 --- a/bob/bio/base/preprocessor/Preprocessor.py +++ b/bob/bio/base/preprocessor/Preprocessor.py @@ -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 -- GitLab