Skip to content

Commit

Permalink
Merge pull request #1 from tiagofrepereira2012/master
Browse files Browse the repository at this point in the history
Fixed issue https://github.com/bioidiap/bob.io.base/issues/1 . In the end the problem was in the bindings of this package
  • Loading branch information
tiagofrepereira2012 committed Jul 16, 2015
2 parents 7c07589 + 82b5780 commit 7061566
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bob/measure/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
#include "error.h"

static int double1d_converter(PyObject* o, PyBlitzArrayObject** a) {
if (PyBlitzArray_Converter(o, a) != 0) return 1;
if (PyBlitzArray_Converter(o, a) == 0) return 0;

// in this case, *a is set to a new reference
if ((*a)->type_num != NPY_FLOAT64 || (*a)->ndim != 1) {
PyErr_Format(PyExc_TypeError, "cannot convert blitz::Array<%s,%" PY_FORMAT_SIZE_T "d> to a blitz::Array<double,1>", PyBlitzArray_TypenumAsString((*a)->type_num), (*a)->ndim);
return 1;
return 0;
}
return 0;
return 1;
}

PyDoc_STRVAR(s_epc_str, "epc");
Expand Down

0 comments on commit 7061566

Please sign in to comment.