Commit fe1c68fa authored by André Anjos's avatar André Anjos

Remove eol whites

parent 2ebf6e6b
......@@ -634,7 +634,7 @@ static PyObject* PyBobLearnLibsvmTrainer_train
}
Xseq_.push_back(make_safe(bz)); ///< prevents data deletion
Xseq.push_back(*PyBlitzArrayCxx_AsBlitz<double,2>(bz)); ///< only a view!
Xseq.push_back(*PyBlitzArrayCxx_AsBlitz<double,2>(bz)); ///< only a view!
}
if (PyErr_Occurred()) return 0;
......@@ -646,7 +646,7 @@ static PyObject* PyBobLearnLibsvmTrainer_train
PyErr_Format(PyExc_RuntimeError, "`%s' requires an iterable for parameter `X' leading to, at least, two entries (representing two classes), but you have passed something that has only %" PY_FORMAT_SIZE_T "d entries", Py_TYPE(self)->tp_name, Xseq.size());
return 0;
}
if ( (Xseq.size() < 1) && (self->cxx->getMachineType()==bob::learn::libsvm::machine_t::ONE_CLASS) ) {
PyErr_Format(PyExc_RuntimeError, "`%s' requires an iterable for parameter `X' leading to, at least, one entry (representing one class), but you have passed something that has only %" PY_FORMAT_SIZE_T "d entries", Py_TYPE(self)->tp_name, Xseq.size());
return 0;
......@@ -675,13 +675,13 @@ static PyObject* PyBobLearnLibsvmTrainer_train
//std::cout << "all basic checks are done, can call the machine now..." << std::endl;
try {
bob::learn::libsvm::Machine* machine;
if(self->cxx->getMachineType()==bob::learn::libsvm::machine_t::ONE_CLASS)
{
if (subtract && divide) machine = self->cxx->train(Xseq,*PyBlitzArrayCxx_AsBlitz<double,1>(subtract),*PyBlitzArrayCxx_AsBlitz<double,1>(divide));
else machine = self->cxx->train(Xseq);
else machine = self->cxx->train(Xseq);
}
else {
else {
if (subtract && divide) machine = self->cxx->train(Xseq,*PyBlitzArrayCxx_AsBlitz<double,1>(subtract),*PyBlitzArrayCxx_AsBlitz<double,1>(divide));
else machine = self->cxx->train(Xseq);
}
......
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