Fastor icon indicating copy to clipboard operation
Fastor copied to clipboard

Multiplying a complex tensor with a complex number gives zero

Open APN-Pucky opened this issue 4 years ago • 1 comments

Tensor<complex<double>,3,3> a = {{1,0,0},{0,0,0},{0,0,0}};
std::cout << a << std::endl << std::endl;
auto b = a*std::complex<double>(3,5);
std::cout << b << std::endl;

results in

[(1,0), (0,0), (0,0)]
[(0,0), (0,0), (0,0)]
[(0,0), (0,0), (0,0)]

[(0,0), (0,0), (0,0)]
[(0,0), (0,0), (0,0)]
[(0,0), (0,0), (0,0)]

which is unexpected. Multiplying a complex tensor with a double however works fine.

Possibly related to #146 .

APN-Pucky avatar Aug 17 '21 21:08 APN-Pucky

Will work on this ASAP. Thanks for reporting.

romeric avatar Jan 01 '22 20:01 romeric