diff --git a/include/armadillo_bits/fn_chol.hpp b/include/armadillo_bits/fn_chol.hpp index c65ef622..8edbf046 100644 --- a/include/armadillo_bits/fn_chol.hpp +++ b/include/armadillo_bits/fn_chol.hpp @@ -95,7 +95,11 @@ chol out = X.get_ref(); - arma_debug_check( (out.is_square() == false), "chol(): given matrix must be square sized" ); + if((arma_config::debug) && (out.is_square() == false)) + { + out.reset(); + arma_stop_logic_error("chol(): given matrix must be square sized"); + } if(out.is_empty()) {