InverseHInto returns incorrect results for row major arrays
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 452
- Fork
- 95
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-ndarray/ndarray-linalg
-
Thin SVD Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
rust-ndarray/ndarray-linalg#414 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
rust-ndarray/ndarray-linalg#413 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
rust-ndarray/ndarray-linalg#404 ·
-
SIGSEGV on qr decomposition Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
rust-ndarray/ndarray-linalg#402 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
rust-ndarray/ndarray-linalg#401 · 2 reazioni ·
Tutte le issue di rust-ndarray/ndarray-linalg
Issue simili
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
paritytech/zombienet-sdk#591 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
farion1231/cc-switch#7638 · 1 commento ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100