"Qinfeng(Javen) Shi "
Dear all,
I wraped a v_varray class into python by boost. I called it in python, most of its attributes work well. Only when I call a.push(1.0),it crashed due to not match type.
For the record, that's not a crash.
The problem is that my input argument in c++ is float*(for passing an array) while python has no pointer type.
That's one way to look at it.
How can I pass a variable in python to a.push() to make sure it work correctly?
Depends what you mean by "work correctly." You need to decide what
semantics you want. If you want your float to be treated as an array
of one element, you could use a "thin wrapper":
void push(v_array