From 3d7fd53b53ae43c0a4ed0e980ae640fa8b18445e Mon Sep 17 00:00:00 2001 From: conrad Date: Fri, 26 Jun 2026 12:27:57 +1000 Subject: [PATCH] fill only non-integer matrices with NaN --- include/armadillo_bits/diskio_meat.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/armadillo_bits/diskio_meat.hpp b/include/armadillo_bits/diskio_meat.hpp index 53285666..e4112ee1 100644 --- a/include/armadillo_bits/diskio_meat.hpp +++ b/include/armadillo_bits/diskio_meat.hpp @@ -1865,7 +1865,7 @@ diskio::load_csv_ascii(Mat& x, std::istream& f, std::string& err_msg, const try { x.zeros(f_n_rows, f_n_cols); } catch(...) { err_msg = "not enough memory"; return false; } - if(strict) { x.fill(Datum::nan); } // take into account that each row may have a unique number of columns + if(strict && is_real::yes) { x.fill(Datum::nan); } // take into account that each row may have a unique number of columns const bool use_mp = (arma_config::openmp) && (f_n_rows >= 2) && (f_n_cols >= 64);