Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all or fseq gives wrong ordered complex vector? #146

Open
APN-Pucky opened this issue Jun 15, 2021 · 4 comments
Open

all or fseq gives wrong ordered complex vector? #146

APN-Pucky opened this issue Jun 15, 2021 · 4 comments

Comments

@APN-Pucky
Copy link

APN-Pucky commented Jun 15, 2021

  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
Copy link
Author

APN-Pucky commented Jun 15, 2021

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

@APN-Pucky
Copy link
Author

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

@APN-Pucky APN-Pucky changed the title all or fseq gives wrong ordered vector? all or fseq gives wrong ordered complex vector? Jun 15, 2021
@romeric
Copy link
Owner

romeric commented Jul 21, 2021

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

@APN-Pucky
Copy link
Author

Any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants