Tensor.Remove Singleton Axes<T> Method
Removes all singleton dimensions from a tensor.
Definition
Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
If tensor has any singleton dimensions (of length 1), then a tensor of lower rank with these dimensions removed; otherwise, tensor.
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
public static Tensor<T> RemoveSingletonAxes<T>(
Tensor<T> tensor
)
Parameters
- tensor Tensor<T>
- A tensor.
Type Parameters
- T
- The type of the elements of the tensor.
Return Value
Tensor<T>If tensor has any singleton dimensions (of length 1), then a tensor of lower rank with these dimensions removed; otherwise, tensor.
Exceptions
Argument | tensor is null. |