From 715d5b08aae1dc405160bf15b1772aff2ba3e353 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Mon, 4 Sep 2023 12:42:16 +0200 Subject: [PATCH] Last fix with resize --- docs/python/programming/math/matrix.rst | 26 ------------------------- src/ivoc/ocmatrix.cpp | 4 +++- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/docs/python/programming/math/matrix.rst b/docs/python/programming/math/matrix.rst index b75c777c04..62e7f1b044 100755 --- a/docs/python/programming/math/matrix.rst +++ b/docs/python/programming/math/matrix.rst @@ -500,10 +500,6 @@ Matrix - .. warning:: - Implemented only for full and sparse matrices. - - ---- @@ -660,9 +656,6 @@ Matrix print() m.solv(b,1).printf("%8.3f", 475, 535) - .. warning:: - Implemented only for full and sparse matrices. - ---- @@ -790,9 +783,6 @@ Matrix m.printf() - .. warning:: - Implemented only for full and sparse matrices. - ---- @@ -813,9 +803,6 @@ Matrix Otherwise fill the matrix row with a constant. - .. warning:: - Implemented only for full matrices and sparse. - ---- @@ -836,9 +823,6 @@ Matrix Otherwise fill the matrix column with a constant. - .. warning:: - Implemented only for full matrices. - ---- @@ -883,9 +867,6 @@ Matrix m.printf() - .. warning:: - Implemented only for full and sparse matrices. - ---- @@ -901,9 +882,6 @@ Matrix Description: Fills the matrix with 0. - .. warning:: - Implemented only for full matrices. - ---- @@ -929,10 +907,6 @@ Matrix m.printf() - .. warning:: - Implemented only for full matrices. - - ---- diff --git a/src/ivoc/ocmatrix.cpp b/src/ivoc/ocmatrix.cpp index ff6614f449..2823c58b50 100644 --- a/src/ivoc/ocmatrix.cpp +++ b/src/ivoc/ocmatrix.cpp @@ -79,7 +79,9 @@ int OcFullMatrix::ncol() { } void OcFullMatrix::resize(int i, int j) { - m_.conservativeResize(i, j); + // This is here because we want that new values are initialized to 0 + auto v = Eigen::MatrixXd::Zero(i, j); + m_.conservativeResizeLike(v); } void OcFullMatrix::mulv(Vect* vin, Vect* vout) {