Closed Thoemi09 closed 1 month ago
As you have also clarified in your documentation improvements, c.f. https://github.com/TRIQS/nda/blob/b5c39bb80ec6ec398c2c55bd6b7d61fef348067c/c%2B%2B/nda/layout/idx_map.hpp#L594-L596
the convention in NDA is for the permutation to describe how to obtain the new length / stride value from the old one,
i.e. Snew[p(i)] = S[i]
and Lnew[p(i)] = L[i]
The behavior of
permuted_indices_view
(and theidx_map::transpose
function) works differently than I would expect. Instead of applying a given permutation directly to the indices, the inverse permutation is applied.Steps to reproduce
Output:
Expected behavior
I would have expected a behavior like numpy's transpose function:
Output: