dimforge / dimforge/nalgebra

Unable to multiply complex matrix with complex scalar from the left

Open
#1,338 2 comments 0 reactions 1 assignee Claimed by @tpdickso View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

Hi there,

It is currently not possible to multiply a complex matrix with a complex scalar from the left, as illustrated here:
```rust
use nalgebra::{Complex, Matrix2};

fn main() {
let mat = Matrix2::>::identity();
let c = Complex::::new(1.0, -1.0);

let product = mat * c; // This works
let product = c * mat; // This does not compile
}
```

I suspect this is because `Complex` might be an external type. Is there a way to fix this currently or is it not possible? It is not a huge issue since you can always swap the multiplication order, but it is annoying.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.