Scalar operations with complex array and complex scalars

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
rust
領域
data

調査の方向性

The issue provides a Rust reproduction using ndarray arrays and num_complex::Complex64; start by tracing ndarray's scalar operator implementations and existing multiplication tests. Check the trait constraints for combinations of Complex64 and f64. Done means the reported operations have regression coverage and work as requested, or their unsupported status is clearly explained.

索引モデルが issue の本文から書いたものです。

説明

Hi there,

thanks a lot for the nice library! I hope this is the right place to ask questions! Please feel free to close if it's not.

I am having problems understanding why the following is not working.

use num_complex::Complex64;
use ndarray::arr1;

fn main() {
    let complex_array = arr1(&[Complex64::from(1.0), Complex64::from(2.0)]);
    let complex_scalar = Complex64::from(1.0);
    let f_scalar = 1.0;
    let f_array = arr1(&[1.0, 2.0]);
    println!("{}", &complex_array * f_scalar);
    println!("{}", &complex_array * complex_scalar);
    println!("{}", complex_scalar * &complex_array);
    // println!("{}", complex_scalar * &f_array); // <- not working
    // println!("{}", f_scalar * complex_array); // <- not working
}

I could circumvent these problems by manually iterating through arrays but it makes the code less readable and less ergonomic. Maybe someone could help me understand why these operations are a problem.

主要言語
Rust
スター
4.3k
フォーク
391
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

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

rust-ndarray/ndarray のほかの issue

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

似ている issue

Rust の issue をもっと見る

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

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