19
私はmatlabからPythonに翻訳しています。matlabの "permute" in python
MathWorks社のMATLABコードは、メソッドを使用して並び替える:
B = PERMUTE(A,ORDER) rearranges the dimensions of A so that they
% are in the order specified by the vector ORDER. The array produced
% has the same values as A but the order of the subscripts needed to
% access any particular element are rearranged as specified by ORDER.
% For an N-D array A, numel(ORDER)>=ndims(A). All the elements of
% ORDER must be unique.
は、Python/numpyので同等の方法はありますか?
[numpy.rollaxis](http://docs.scipy.org/doc/numpy/reference/generated/numpy.rollaxis.html#numpy.rollaxis)は近いです... – mgilson
@Mauritsこれはランダムな順列です。 Matlabの関数 "permute"の記述にランダムなことは何もないので、ランダムでないと仮定します。 – LynnH
@ user1729698私の間違いです。 – Maurits