Language

Tensor.ResizeTo Method

Definition

Overloads

Name Description
ResizeTo<T>(ReadOnlyTensorSpan<T>, TensorSpan<T>)

Copies the data from tensor. If the final shape is smaller all data after that point is ignored. If the final shape is bigger it is filled with the default value of T.

ResizeTo<T>(Tensor<T>, TensorSpan<T>)

Copies the data from tensor. If the final shape is smaller all data after that point is ignored. If the final shape is bigger it is filled with the default value of T.

ResizeTo<T>(TensorSpan<T>, TensorSpan<T>)

Copies the data from tensor. If the final shape is smaller all data after that point is ignored. If the final shape is bigger it is filled with the default value of T.

ResizeTo<T>(ReadOnlyTensorSpan<T>, TensorSpan<T>)

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

Copies the data from tensor. If the final shape is smaller all data after that point is ignored. If the final shape is bigger it is filled with the default value of T.

public:
generic <typename T>
 static void ResizeTo(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % tensor, System::Numerics::Tensors::TensorSpan<T> % destination);
public static void ResizeTo<T>(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);
static member ResizeTo : ReadOnlyTensorSpan * TensorSpan -> unit
Public Sub ResizeTo(Of T) (ByRef tensor As ReadOnlyTensorSpan(Of T), ByRef destination As TensorSpan(Of T))

Type Parameters

T

Parameters

destination
TensorSpan<T>

Destination TensorSpan<T> with the desired new shape.

Applies to

ResizeTo<T>(Tensor<T>, TensorSpan<T>)

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

Copies the data from tensor. If the final shape is smaller all data after that point is ignored. If the final shape is bigger it is filled with the default value of T.

public:
generic <typename T>
 static void ResizeTo(System::Numerics::Tensors::Tensor<T> ^ % tensor, System::Numerics::Tensors::TensorSpan<T> % destination);
public static void ResizeTo<T>(scoped in System.Numerics.Tensors.Tensor<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);
static member ResizeTo : Tensor * TensorSpan -> unit
Public Sub ResizeTo(Of T) (ByRef tensor As Tensor(Of T), ByRef destination As TensorSpan(Of T))

Type Parameters

T

Parameters

tensor
Tensor<T>

Input Tensor<T>.

destination
TensorSpan<T>

Destination TensorSpan<T> with the desired new shape.

Applies to

ResizeTo<T>(TensorSpan<T>, TensorSpan<T>)

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

Copies the data from tensor. If the final shape is smaller all data after that point is ignored. If the final shape is bigger it is filled with the default value of T.

public:
generic <typename T>
 static void ResizeTo(System::Numerics::Tensors::TensorSpan<T> % tensor, System::Numerics::Tensors::TensorSpan<T> % destination);
public static void ResizeTo<T>(scoped in System.Numerics.Tensors.TensorSpan<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);
static member ResizeTo : TensorSpan * TensorSpan -> unit
Public Sub ResizeTo(Of T) (ByRef tensor As TensorSpan(Of T), ByRef destination As TensorSpan(Of T))

Type Parameters

T

Parameters

destination
TensorSpan<T>

Destination TensorSpan<T> with the desired new shape.

Applies to