OCP
OCP copied to clipboard
How to update math_Matrix
trafficstars
Hi Friends,
I need to use math_Matrix in an algorithm in python, but the c++ object is updated using non const references returned by auto operator(int, int) -> double&.
In C++:
void something(math_Matrix& m) {
m(1,5) = 0.5;
}
In python this has no sense:
from OCP.math import math_Matrix
def something(m: math_Matrix):
m(1,5) = 0.5
Same problem with math_Vector
I appreciate any advice.
Thanks.
Not ideal, but try m.Set(i,i,j,j, OCP.math.math_Matrix(1,1,1,1, value)).