i am trying to permute an array as described in the documentation (actual a link to mathworks).
My code, however does not reproduce the results. Actually, it seems like my code does nothing:
INDArray foobar = Nd4j.linspace(0, 2, 3);
System.out.println("foobar = " + foobar);
System.out.println("foobar.permute(2, 1, 0) = " + foobar.permute(2, 1, 0));
Output is the same for foobar
and foobar.permute
.
Where did I mess up?
Optional: Any information on how permute work (syntax-wise) with higher dimensions like 2d or 3d matrices would be appreciated.