Tensor<T>.Move Axes Method
Definition
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
Overload List
Move | Moves a set of axes to new positions in a tensor. |
Move | Moves a set of axes to new positions in a tensor. |
Move | Moves a set of axes to new positions in a tensor. |
Move | Moves a set of axes to new positions in a tensor. |
MoveAxes(Int32[])
public Tensor<T> MoveAxes(
int[] axes
)
Parameters
- axes Int32[]
- An array containing the desired new positions of the axes.
Return Value
Tensor<T>A view of the tensor with the axes moved to the positions specified in axes.
Remarks
Negative values indicate the axis should be counted from the end.
The source and destination axes must each be unique.
Exceptions
Argument | The axes specified by axes are not all unique. |
MoveAxes(ReadOnlySpan<Int32>)
public abstract Tensor<T> MoveAxes(
ReadOnlySpan<int> axes
)
Parameters
- axes ReadOnlySpan<Int32>
- A read-only span containing the desired new positions of the axes.
Return Value
Tensor<T>A view of the tensor with the axes moved to the positions specified in axes.
Remarks
Negative values indicate the axis should be counted from the end.
The source and destination axes must each be unique.
Exceptions
Argument | The axes specified by axes are not all unique. |
MoveAxes(Int32[], Int32[])
public Tensor<T> MoveAxes(
int[] source,
int[] destination
)
Parameters
- source Int32[]
- An array containing the axes to move.
- destination Int32[]
- An array containing the desired new positions of the axes.
Return Value
Tensor<T>A view of the tensor with axes in source moved to the corresponding positions in destination.
Remarks
Negative values indicate the axis should be counted from the end.
The source and destination axes must each be unique.
Exceptions
Dimension | source and destination do not have the same length. |
Argument | The axes specified by source are not all unique. -or- The axes specified by destination are not all unique. |
MoveAxes(ReadOnlySpan<Int32>, ReadOnlySpan<Int32>)
public Tensor<T> MoveAxes(
ReadOnlySpan<int> source,
ReadOnlySpan<int> destination
)
Parameters
- source ReadOnlySpan<Int32>
- A read-only span containing the axes to move.
- destination ReadOnlySpan<Int32>
- A read-only span containing the desired new positions of the axes.
Return Value
Tensor<T>A view of the tensor with axes in source moved to the corresponding positions in destination.
Remarks
Negative values indicate the axis should be counted from the end.
The source and destination axes must each be unique.
Exceptions
Dimension | source and destination do not have the same length. |
Argument | The axes specified by source are not all unique. -or- The axes specified by destination are not all unique. |