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
The default display in pyttb is to display the 2D slices w.r.t. the last 2 modes. This is in contrast to MATLAB which displays them w.r.t. the first two modes. For a 3-way tensor, pyttb displays the lateral slices rather than the frontal slices. I think it should be changed or at least there should be a function that displays it the MATLAB TTB way.
Example in MATLAB:
X = tensor([1:8],[2 2 2])
Output:
X is a tensor of size 2 x 2 x 2
X(:,:,1) =
1 3
2 4
X(:,:,2) =
5 7
6 8
I expect these display orders are artifacts of the underlying default storage. By default, MATLAB prints in such a way that it's linear in memory. Python uses the opposite ordering by default, so it's perhaps not surprising that its printing is in the opposite order. But since pyttb is storing things in the MATLAB order internally, it should also print them this way.
The text was updated successfully, but these errors were encountered:
The default display in pyttb is to display the 2D slices w.r.t. the last 2 modes. This is in contrast to MATLAB which displays them w.r.t. the first two modes. For a 3-way tensor, pyttb displays the lateral slices rather than the frontal slices. I think it should be changed or at least there should be a function that displays it the MATLAB TTB way.
Example in MATLAB:
Output:
Same example in Python:
Output:
I expect these display orders are artifacts of the underlying default storage. By default, MATLAB prints in such a way that it's linear in memory. Python uses the opposite ordering by default, so it's perhaps not surprising that its printing is in the opposite order. But since pyttb is storing things in the MATLAB order internally, it should also print them this way.
The text was updated successfully, but these errors were encountered: