Dot product with complex numbers

Aperta
#272 5 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
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
data

Direzione di ricerca

Start with the dot() entry point and reproduce the issue using the Complex::new example in the report. Check the intended dot-product semantics for complex values, then determine whether the observed result is incorrect or expected. Done means the behavior is resolved or clearly documented, with verification for the reported example.

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

Descrizione

It looks that dot() function gives wrong result when used with complex numbers:

What I would expect:

let xs = Array::from_vec(vec![Complex::new(1., 1.), Complex::new(3., -1.)]);
assert!(xs.dot(&xs) == 12.);

What I get:

Complex { re: 8, im: -4 }

Dot product should never be a complex number.
Is this bug or this function means something else?

Lingua principale
Rust
Stelle
4.3k
Fork
391
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

Tutte le issue di rust-ndarray/ndarray

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.