diff --git a/include/armadillo_bits/op_inv_meat.hpp b/include/armadillo_bits/op_inv_meat.hpp index 69a46958..e8af684c 100644 --- a/include/armadillo_bits/op_inv_meat.hpp +++ b/include/armadillo_bits/op_inv_meat.hpp @@ -306,7 +306,7 @@ op_inv_sympd::apply_direct(Mat& out, const Base& out, const Base::no) && (out.is_diagmat())) - // { - // const uword N = (std::min)(out.n_rows, out.n_cols); - // - // for(uword i=0; i::no) && (out.is_diagmat())) + { + // specialised handling of real matrices only; + // currently auxlib::inv_sympd() does not enforce that + // imaginary components of diagonal elements must be zero; + // strictly enforcing this constraint may break existing user software. + + const uword N = (std::min)(out.n_rows, out.n_cols); + + for(uword i=0; i