ndarray-linalg icon indicating copy to clipboard operation
ndarray-linalg copied to clipboard

Error handling for NAN cases

Open termoshtt opened this issue 6 years ago • 0 comments

From https://github.com/LukeMathWalker/linfa/issues/11

$ cargo test --features=intel-mkl
...
[/home/teramura/.cargo/registry/src/github.com-1ecc6299db9ec823/ndarray-linalg-0.12.0/src/lapack/svd.rs:83] ldvt = 100
temp[0, 0] = -483774241208677100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
temp[0, 1] = -1581024226846399000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
temp[1, 0] = -417737396116675400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
[/home/teramura/.cargo/registry/src/github.com-1ecc6299db9ec823/ndarray-linalg-0.12.0/src/lapack/svd.rs:83] ldvt = 100
temp[0, 0] = NaN
temp[0, 1] = NaN
temp[1, 0] = NaN
[/home/teramura/.cargo/registry/src/github.com-1ecc6299db9ec823/ndarray-linalg-0.12.0/src/lapack/svd.rs:83] ldvt = 100
thread 'rPCA::algorithm::tests::test_rPCA' panicked at 'called `Result::unwrap()` on an `Err` value: Lapack { return_code: -6 }', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Most user cannot understand this error message is due to NaN input array.

termoshtt avatar Dec 27 '19 19:12 termoshtt