Language

Tensor.Stack Method

Definition

Overloads

Name Description
Stack<T>(ReadOnlySpan<Tensor<T>>)

Join multiple Tensor<T> along a new dimension that is added at position 0. All tensors must have equivalent shapes.

Stack<T>(ReadOnlySpan<Tensor<T>>, TensorSpan<T>)

Join multiple Tensor<T> along a new dimension that is added at position 0. All tensors must have equivalent shapes.

Stack<T>(ReadOnlySpan<Tensor<T>>)

Source:
Tensor.cs
Source:
TensorExtensions.cs
Source:
Tensor.cs

Join multiple Tensor<T> along a new dimension that is added at position 0. All tensors must have equivalent shapes.

public:
generic <typename T>
 static System::Numerics::Tensors::Tensor<T> ^ Stack(ReadOnlySpan<System::Numerics::Tensors::Tensor<T> ^> tensors);
public static System.Numerics.Tensors.Tensor<T> Stack<T>(scoped ReadOnlySpan<System.Numerics.Tensors.Tensor<T>> tensors);
static member Stack : ReadOnlySpan<System.Numerics.Tensors.Tensor<'T>> -> System.Numerics.Tensors.Tensor<'T>
Public Function Stack(Of T) (tensors As ReadOnlySpan(Of Tensor(Of T))) As Tensor(Of T)

Type Parameters

T

Parameters

tensors
ReadOnlySpan<Tensor<T>>

Input Tensor<T>.

Returns

Remarks

Inputs are aligned to the first tensor's shape by adding or removing leading singleton dimensions. Rank-zero empty tensors have effective shape [0].

Applies to

Stack<T>(ReadOnlySpan<Tensor<T>>, TensorSpan<T>)

Source:
Tensor.cs
Source:
TensorExtensions.cs
Source:
Tensor.cs

Join multiple Tensor<T> along a new dimension that is added at position 0. All tensors must have equivalent shapes.

public:
generic <typename T>
 static System::Numerics::Tensors::TensorSpan<T> ^ Stack(ReadOnlySpan<System::Numerics::Tensors::Tensor<T> ^> % tensors, System::Numerics::Tensors::TensorSpan<T> % destination);
public static ref readonly System.Numerics.Tensors.TensorSpan<T> Stack<T>(scoped in ReadOnlySpan<System.Numerics.Tensors.Tensor<T>> tensors, in System.Numerics.Tensors.TensorSpan<T> destination);
static member Stack : ReadOnlySpan * TensorSpan -> TensorSpan
Public Function Stack(Of T) (ByRef tensors As ReadOnlySpan(Of Tensor(Of T)), ByRef destination As TensorSpan(Of T)) As TensorSpan(Of T)

Type Parameters

T

Parameters

tensors
ReadOnlySpan<Tensor<T>>

Input Tensor<T>.

destination
TensorSpan<T>

Returns

Remarks

Inputs are aligned to the first tensor's shape by adding or removing leading singleton dimensions. The destination may differ from the result by leading singleton padding. Rank-zero empty tensors have effective shape [0].

Applies to