It seems like calling .is_all_nan returns true when all values are NOT nan, and false otherwise. The below code reproduces the error for me
use ndarray::Array2;
fn main() {
let mut arr_one = Array2::from_elem((10, 10), 1.0f32);
assert!(arr_one.is_all_nan()); // Response it true, but should be false
arr_one[(3, 3)] = f32::NAN;
assert!(!arr_one.is_all_nan()); // Response is false, which is correct
let arr_nan = Array2::from_elem((10, 10), f32::NAN);
assert!(!arr_nan.is_all_nan()); // Response is false, but it should be true
}
It seems like calling
.is_all_nanreturns true when all values are NOT nan, and false otherwise. The below code reproduces the error for me