Tensor<T>.Transpose Method

Swaps the last two dimensions of the tensor and returns the result.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
public Tensor<T> Transpose()

Return Value

Tensor<T>

Remarks

For tensors of rank 0 or 1, the original tensor is returned. For tensors of rank 2, this method returns the matrix transpose. For tensors of rank higher than 2, the last two dimensions are swapped.

See Also