.is_all_nan() returns true for an all-finite array
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start by locating the implementation of the .is_all_nan() entry point and reproduce the behavior with the Rust example in the issue. Confirm the expected results for all-finite, mixed, and all-NaN arrays, then add or update coverage so the method returns true only for an all-NaN array.
Written by the indexing model from the issue text.
Description
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
}
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 391
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-ndarray/ndarray
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rust-ndarray/ndarray#1617 · 1 comment ·
-
bug good first issue
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rust-ndarray/ndarray#1615 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rust-ndarray/ndarray#1610 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
rust-ndarray/ndarray#1609 ·
-
breaking-change enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
rust-ndarray/ndarray#1591 · 2 comments ·
All issues in rust-ndarray/ndarray
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100