Transpose on an array. More...

array T () const
 Transpose matrix or vector. More...
 

Detailed Description

Transpose on an array.

This function will transpose a matrix.

Function Documentation

array T ( ) const

Transpose matrix or vector.

array X = randn(2,3);
print(X);
print(X.T());
X =
    0.5434    -1.4913     0.1374
   -0.7168     1.4805    -1.2208
X.T() =
    0.5434    -0.7168
   -1.4913     1.4805
    0.1374    -1.2208
Examples:
examples/getting_started/integer.cpp, examples/machine_learning/neuralnetwork.cpp, and examples/pde/fdtd.cpp.