Commit 1ff42237 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Fixing issue #12. The test done in the bindings for the acc_statistics method,...

Fixing issue #12. The test done in the bindings for the acc_statistics method, does not work in 32 bits
parent fc20aae9
......@@ -766,11 +766,10 @@ static PyObject* PyBobLearnEMGMMMachine_accStatistics(PyBobLearnEMGMMMachineObje
//protects acquired resources through this scope
auto input_ = make_safe(input);
blitz::Array<double,2> blitz_test = *PyBlitzArrayCxx_AsBlitz<double,2>(input);
if (blitz_test.extent(1)==0)
if (input->ndim == 1)
self->cxx->accStatistics(*PyBlitzArrayCxx_AsBlitz<double,1>(input), *stats->cxx);
else
self->cxx->accStatistics(blitz_test, *stats->cxx);
self->cxx->accStatistics(*PyBlitzArrayCxx_AsBlitz<double,2>(input), *stats->cxx);
BOB_CATCH_MEMBER("cannot accumulate the statistics", 0)
......@@ -803,11 +802,10 @@ static PyObject* PyBobLearnEMGMMMachine_accStatistics_(PyBobLearnEMGMMMachineObj
//protects acquired resources through this scope
auto input_ = make_safe(input);
blitz::Array<double,2> blitz_test = *PyBlitzArrayCxx_AsBlitz<double,2>(input);
if (blitz_test.extent(1)==0)
if (input->ndim==1)
self->cxx->accStatistics_(*PyBlitzArrayCxx_AsBlitz<double,1>(input), *stats->cxx);
else
self->cxx->accStatistics_(blitz_test, *stats->cxx);
self->cxx->accStatistics_(*PyBlitzArrayCxx_AsBlitz<double,2>(input), *stats->cxx);
BOB_CATCH_MEMBER("cannot accumulate the statistics", 0)
Py_RETURN_NONE;
......
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