Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Example failing on mac os

Aperta
#293 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
data

Direzione di ricerca

Reproduce the test from the issue using the shown Cargo.toml dependencies and the solve_into entry point on macOS. Inspect the OpenBLAS backend configuration and the ndarray-linalg solve path to determine whether the incorrect result is backend-specific. Done means identifying the cause and adding or updating a regression test for the expected solution.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I'm having an issue getting the crate to work reliably on OSX. My product requires some simple linear algebra, using the solve functions. My Cargo.toml looks like this

[dependencies]
ndarray = { version = "0.14" }
num-complex = { version = "0.3.1" }
ndarray-linalg = { version = "0.13.1", features=["openblas"] }

and I am trying to run a simple test I lifted the examples in the crate docs

#[test]
fn test_mat_mul() {
    use ndarray::prelude::*;
    use ndarray_linalg::Solve;

    let a: Array2<f64> = array![[3., 2., -1.], [2., -2., 4.], [-2., 1., -2.]];
    let b: Array1<f64> = array![1., -2., 0.];
    let x = a.solve_into(b).unwrap();
    assert!(x.all_close(&array![1., -2., -2.], 1e-9));
}

which I would expect to pass fine. Instead it finds x = [1.0, 1.2000000000000002, -0.40000000000000013].

Any ideas? Is this a problem with using the openblas backend on osx?

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-ndarray/ndarray-linalg

Tutte le issue di rust-ndarray/ndarray-linalg

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.