MagnitudeCorrection trait should be public
还没有人认领这个 Issue。
评估
调研方向
Start at the public exports for the ndarray-linalg::lobpcg module and trace how MagnitudeCorrection is defined and used by TruncatedSvd. Reproduce the provided generic-Float example, then verify that the trait can be imported and used as a bound and that the example compiles.
由索引模型根据 Issue 内容生成。
描述
I tried to use TruncatedSvd with a generic Float type but it can not compile as it has to use the MagnitudeCorrection trait which is not exported from ndarray-linalg::lobpcg module. My test program here:
use ndarray::{arr1, arr2, Array1, Array2, ScalarOperand};
use ndarray_linalg::{close_l2, Lapack, TruncatedOrder, TruncatedSvd}; // should use MagnitudeCorrection as well
use num_traits::Float;
fn test_truncated_svd<F: Float + Lapack + ScalarOperand + Default>( // should add MagnitudeCorrection trait bound
a: Array2<F>,
) -> Array1<F> {
let res = TruncatedSvd::new(a, TruncatedOrder::Largest)
.precision(1e-5)
.maxiter(10)
.decompose(2)
.unwrap();
let (_, sigma, _) = res.values_vectors();
sigma
}
fn main() {
let a = arr2(&[[3., 2., 2.], [2., 3., -2.]]);
let sigma = test_truncated_svd(a);
close_l2(&sigma, &arr1(&[5.0, 3.0]), 1e-5);
}
- 主要语言
- Rust
- 星标
- 452
- 派生
- 95
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-ndarray/ndarray-linalg 的其他 Issue
-
Thin SVD 未关闭
难度 5/5 一周以上 新手友好度 38/100
rust-ndarray/ndarray-linalg#414 ·
-
难度 5/5 一周以上 新手友好度 30/100
rust-ndarray/ndarray-linalg#413 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 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 个 reaction ·
查看 rust-ndarray/ndarray-linalg 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug good first issue package: quic
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 1/5 1 小时以内 新手友好度 78/100
-
`dora trace view` sends a non-canonical full UUID as-is, so a valid trace ID shows "No spans found" 未关闭cli coordinator rust
难度 2/5 1-3 小时 新手友好度 88/100
-
area: tasks enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
Jason-jo17/Polybench#15 · 1 条评论 ·