You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Index u(2);
auto p = randomITensorC(u, prime(u))*delta(u, u);
Running compiled with debug flags gives me the error:
terminate called after throwing an instance of 'std::runtime_error'
what(): index out of range in InfArray
I ran into this while combining indices programmatically and while obviously a huge corner case it would have been helpful to know what the problem was.
I can push a fix, but is the intent that a) delta(u,u) should throw an error, or b) that it should return ITensor(1) or something to that effect? Or c) is any sort of check left out for optimisation purposes and the behaviour as-is intended? To me b) seems most intuitive.
The text was updated successfully, but these errors were encountered:
This is meant to be an error (defining any ITensor with repeated indices is not well defined behavior). It would definitely be good to have a better error message, at least in debug mode.
Running compiled with debug flags gives me the error:
I ran into this while combining indices programmatically and while obviously a huge corner case it would have been helpful to know what the problem was.
I can push a fix, but is the intent that a) delta(u,u) should throw an error, or b) that it should return ITensor(1) or something to that effect? Or c) is any sort of check left out for optimisation purposes and the behaviour as-is intended? To me b) seems most intuitive.
The text was updated successfully, but these errors were encountered: