Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bindings/pylibROM/linalg/pyMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void init_matrix(pybind11::module_ &m) {
.def("getFirstNColumns", (void (Matrix::*)(int, Matrix&) const) &Matrix::getFirstNColumns)

.def("mult",[](const Matrix& self, const Matrix& other){
Matrix* result = new Matrix();
Matrix* result = nullptr;
self.mult(other,result);
return result;
},py::return_value_policy::take_ownership)
Expand All @@ -94,7 +94,7 @@ void init_matrix(pybind11::module_ &m) {
})
.def("mult", (void (Matrix::*)(const Matrix&, Matrix&) const) &Matrix::mult)
.def("mult", [](Matrix& self, const Vector& other){
Vector* result = new Vector();
Vector* result = nullptr;
self.mult(other,result);
return result;
}, py::return_value_policy::take_ownership)
Expand All @@ -112,7 +112,7 @@ void init_matrix(pybind11::module_ &m) {
})

.def("elementwise_mult",[](const Matrix& self, const Matrix& other) {
Matrix* result = new Matrix();
Matrix* result = nullptr;
self.elementwise_mult(other, result);
return result;
}, py::return_value_policy::take_ownership)
Expand All @@ -123,7 +123,7 @@ void init_matrix(pybind11::module_ &m) {
.def("elementwise_mult",(void (Matrix::*)(const Matrix&,Matrix&) const) &Matrix::elementwise_mult)

.def("elementwise_square",[](const Matrix& self) {
Matrix* result = new Matrix();
Matrix* result = nullptr;
self.elementwise_square(result);
return result;
},py::return_value_policy::take_ownership)
Expand All @@ -135,7 +135,7 @@ void init_matrix(pybind11::module_ &m) {
.def("multPlus", (void (Matrix::*)(Vector&,const Vector&,double) const) &Matrix::multPlus)

.def("transposeMult",[](const Matrix& self, const Matrix& other) {
Matrix* result = new Matrix();
Matrix* result = nullptr;
self.transposeMult(other, result);
return result;
},py::return_value_policy::take_ownership)
Expand All @@ -145,7 +145,7 @@ void init_matrix(pybind11::module_ &m) {
})
.def("transposeMult", (void (Matrix::*)(const Matrix&, Matrix&) const) &Matrix::transposeMult)
.def("transposeMult",[](const Matrix& self, const Vector& other) {
Vector* result = new Vector();
Vector* result = nullptr;
self.transposeMult(other, result);
return result;
},py::return_value_policy::take_ownership)
Expand Down