Fastor icon indicating copy to clipboard operation
Fastor copied to clipboard

all or fseq gives wrong ordered complex vector?

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

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

gives

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

which I find very confusing, since I'd expect the 1 to be at the beginning.

Probably related to #121 .

APN-Pucky avatar Jun 15 '21 15:06 APN-Pucky

If I use int or double instead of complex<double> the ordering is correct.

APN-Pucky avatar Jun 15 '21 15:06 APN-Pucky

One workaround is b=einsum<...>(unit_vector,a).

APN-Pucky avatar Jun 15 '21 16:06 APN-Pucky

Most likely a bug. I will take a look ASAP. Thanks for reporting.

romeric avatar Jul 21 '21 04:07 romeric

Any progress?

APN-Pucky avatar Oct 05 '21 09:10 APN-Pucky