InverseHInto returns incorrect results for row major arrays
まだ誰も着手していません。
評価
調査の方向性
Reproduce the provided Rust example and inspect the invh_into entry point, especially its handling after the LAPACK routine and the triangular portion copied for row-major arrays. Done means the row-major example returns the expected matrix while the reversed-axes case continues to pass.
索引モデルが issue の本文から書いたものです。
説明
This example
use approx::assert_abs_diff_eq;
use ndarray::*;
use ndarray_linalg::*;
fn main() {
let arr = array![[1., 3.], [3., 1.]];
assert_abs_diff_eq!(
arr.invh_into().unwrap(),
array![[-0.125, 0.375], [0.375, -0.125]],
epsilon = 1e-9,
);
}
fails with the following message
thread 'main' panicked at 'assert_abs_diff_eq!(arr.invh_into().unwrap(), array![[- 0.125, 0.375], [0.375, - 0.125]], epsilon = 1e-9)
left = [[-0.125, 3.0],
[3.0, -0.125]], shape=[2, 2], strides=[2, 1], layout=Cc (0x5), const ndim=2
right = [[-0.125, 0.375],
[0.375, -0.125]], shape=[2, 2], strides=[2, 1], layout=Cc (0x5), const ndim=2
It seems that invh_into is copying the incorrect triangular portion to overwrite the other triangular portion of the matrix after calling the LAPACK routine. This bug is layout-dependent. Changing arr in the example to array![[1., 3.], [3., 1.]].reversed_axes() causes the assertion to pass.
- 主要言語
- Rust
- スター
- 452
- フォーク
- 95
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-ndarray/ndarray-linalg のほかの issue
-
Thin SVD オープン
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
rust-ndarray/ndarray-linalg#414 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
rust-ndarray/ndarray-linalg#413 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
rust-ndarray/ndarray-linalg#404 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
rust-ndarray/ndarray-linalg#402 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
rust-ndarray/ndarray-linalg#401 · リアクション 2 件 ·
rust-ndarray/ndarray-linalg の issue をすべて見る
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yantrikos/yantrik-os#255 ·
-
bug CLI custom-model
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
raphamorim/rio#1956 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rust-bitcoin/rust-bitcoin#6930 · コメント 1 件 ·