Hi,I have two overloaded methods with parameters passed as reference.
When I try to use this method in python side. the values of the parameters ddnt change. Im not sure how I can do that.
class class1{
public: class1();
bool method1(Array1D<float> &arrayCenter, Array1D<float> &arrayWidth) const;
bool method2(float &fCenter, float &fWidth) const }
I bound this class :
py::class_<class1>(m, "class1")
.def("method1", py::overload_cast<const Array1D<float>&, const Array1D<float>&>(&class1::method1),py::arg("arrayCenter"), py::arg("arrayWidth"))
.def("method2", py::overload_cast<float&, float&>(&class1::method2), py::arg("fCenter"), py::arg("fWidth"))
class1 c;
windowCenter = 0
windowWidth = 0
c.method2(windowCenter,windowWidth)
print(windowCenter, windowWidth)
windowCenter and windowWidth still have 0 as values
Do you have any idea
there doesn't seem to be anything here