Example failing on mac os

未关闭
#293 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
rust
领域
data

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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?

主要语言
Rust
星标
452
派生
95
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rust-ndarray/ndarray-linalg 的其他 Issue

查看 rust-ndarray/ndarray-linalg 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。