Commit 287d3755 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Fixed documentation bug

parent 580ba1db
......@@ -251,8 +251,9 @@ static auto initialize = bob::extension::FunctionDoc(
"",
true
)
.add_prototype("gmm_machine")
.add_parameter("gmm_machine", ":py:class:`bob.learn.em.GMMMachine`", "GMMMachine Object");
.add_prototype("gmm_machine,data")
.add_parameter("gmm_machine", ":py:class:`bob.learn.em.GMMMachine`", "GMMMachine Object")
.add_parameter("data", "array_like <float, 2D>", "Ignored.");
static PyObject* PyBobLearnEMMAPGMMTrainer_initialize(PyBobLearnEMMAPGMMTrainerObject* self, PyObject* args, PyObject* kwargs) {
BOB_TRY
......@@ -260,12 +261,14 @@ static PyObject* PyBobLearnEMMAPGMMTrainer_initialize(PyBobLearnEMMAPGMMTrainerO
char** kwlist = initialize.kwlist(0);
PyBobLearnEMGMMMachineObject* gmm_machine = 0;
PyBlitzArrayObject* data = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!", kwlist, &PyBobLearnEMGMMMachine_Type, &gmm_machine)){
PyErr_Format(PyExc_RuntimeError, "%s.%s. Was not possible to read :py:class:`bob.learn.em.GMMMachine`", Py_TYPE(self)->tp_name, initialize.name());
return 0;
}
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|O&", kwlist, &PyBobLearnEMGMMMachine_Type, &gmm_machine,
&PyBlitzArray_Converter, &data)) return 0;
if(data != NULL)
auto data_ = make_safe(data);
self->cxx->initialize(*gmm_machine->cxx);
BOB_CATCH_MEMBER("cannot perform the initialize method", 0)
Py_RETURN_NONE;
......@@ -317,8 +320,9 @@ static auto mStep = bob::extension::FunctionDoc(
"",
true
)
.add_prototype("gmm_machine")
.add_parameter("gmm_machine", ":py:class:`bob.learn.em.GMMMachine`", "GMMMachine Object");
.add_prototype("gmm_machine,data")
.add_parameter("gmm_machine", ":py:class:`bob.learn.em.GMMMachine`", "GMMMachine Object")
.add_parameter("data", "array_like <float, 2D>", "Ignored.");
static PyObject* PyBobLearnEMMAPGMMTrainer_mStep(PyBobLearnEMMAPGMMTrainerObject* self, PyObject* args, PyObject* kwargs) {
BOB_TRY
......@@ -326,8 +330,12 @@ static PyObject* PyBobLearnEMMAPGMMTrainer_mStep(PyBobLearnEMMAPGMMTrainerObject
char** kwlist = mStep.kwlist(0);
PyBobLearnEMGMMMachineObject* gmm_machine;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!", kwlist, &PyBobLearnEMGMMMachine_Type, &gmm_machine)) return 0;
PyBlitzArrayObject* data = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|O&", kwlist, &PyBobLearnEMGMMMachine_Type, &gmm_machine,
&PyBlitzArray_Converter, &data)) return 0;
if(data != NULL)
auto data_ = make_safe(data);
self->cxx->mStep(*gmm_machine->cxx);
......
Supports Markdown
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