Tensor.StackColumns<T> Method

Stacks 1D tensors as columns in a 2D array.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.0
C#
public static Tensor<T> StackColumns<T>(
	Tensor<T>[] tensors,
	Tensor<T>? result = null
)

Parameters

tensors  Tensor<T>[]
An array of 1D tensors with elements of type T.
result  Tensor<T>  (Optional)
Optional. The tensor that is to hold the result. May be null.

Type Parameters

T
The type of the elements of the tensors.

Return Value

Tensor<T>
The tensors in tensors, converted to 2D column arrays and stacked horizontally.

Exceptions

ArgumentNullException

tensors is null.

ArgumentException

One or more of the elements of tensors is null.

DimensionMismatchException

One or more elements of tensors has dimensions that are not compatible with the others.

-or-

result is not null and its dimensions do not match the dimensions of the stacked tensors.

See Also