Skip to content Skip to sidebar Skip to footer

Cython C++ Wrapper Operator() Overloading Error

Connected with my previous question. Using Cython to wrap a C++ class that uses OpenCV types as parameters Now I'm stuck in another error. My cython wrapping code of the OpenCV ty

Solution 1:

Ok, I don't know why that error happened, to me it looks like the syntax

double& operator()(int i, int j)

...should work, but it doesn't. This syntax does work for other operators like +,-,/,*

An alternative syntax that does work is the following:

double& get"operator()"(int i, int j)

Then in cython code when we want to use the operator()(i,j) instead we call get(i, j)

Post a Comment for "Cython C++ Wrapper Operator() Overloading Error"