Tensor.AtLeast3D Method

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3

Overload List

AtLeast3D<T>(Tensor<T>) Gets an equivalent tensor that has at least three dimensions.
AtLeast3D<T>(Tensor<T>[]) Returns an array of equivalent tensors that have at least three dimensions.

AtLeast3D<T>(Tensor<T>)

Gets an equivalent tensor that has at least three dimensions.
C#
public static Tensor<T> AtLeast3D<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>
tensor if its tensor rank is at least 3; otherwise a rank-3 tensor with a depth of 1.

AtLeast3D<T>(Tensor<T>[])

Returns an array of equivalent tensors that have at least three dimensions.
C#
public static Tensor<T>[] AtLeast3D<T>(
	params Tensor<T>[] tensors
)

Parameters

tensors  Tensor<T>[]
An array of tensors.

Type Parameters

T
The type of the elements of the tensors.

Return Value

Tensor<T>[]
An array of tensors. If the tensor rank of an element of tensors is at least 3, then the tensor is returned unmodified; otherwise it is replaced with a rank-3 tensor with depth 1.

See Also