Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

MagnitudeCorrection trait should be public

オープン
#274 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
rust
領域
backend

調査の方向性

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 はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-ndarray/ndarray-linalg のほかの issue

rust-ndarray/ndarray-linalg の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。