Tensor<T>.Slice Method

Definition

Overloads

Slice(ReadOnlySpan<NIndex>)

Forms a slice out of the given tensor

Slice(ReadOnlySpan<NRange>)

Forms a slice out of the given tensor

Slice(ReadOnlySpan<IntPtr>)

Forms a slice out of the given tensor

Slice(ReadOnlySpan<NIndex>)

Source:
Tensor.cs

Forms a slice out of the given tensor

public System.Numerics.Tensors.Tensor<T> Slice (scoped ReadOnlySpan<System.Buffers.NIndex> startIndex);

Parameters

startIndex
ReadOnlySpan<NIndex>

The start indexes for the slice

Returns

Tensor<T> as a copy of the provided ranges.

Implements

Applies to

.NET 9 (package-provided) dan .NET 8 (package-provided)
Produk Versi
.NET 8 (package-provided), 9 (package-provided)

Slice(ReadOnlySpan<NRange>)

Source:
Tensor.cs

Forms a slice out of the given tensor

public System.Numerics.Tensors.Tensor<T> Slice (scoped ReadOnlySpan<System.Buffers.NRange> start);

Parameters

start
ReadOnlySpan<NRange>

The ranges for the slice

Returns

Tensor<T> as a copy of the provided ranges.

Implements

Applies to

.NET 9 (package-provided) dan .NET 8 (package-provided)
Produk Versi
.NET 8 (package-provided), 9 (package-provided)

Slice(ReadOnlySpan<IntPtr>)

Source:
Tensor.cs

Forms a slice out of the given tensor

public System.Numerics.Tensors.Tensor<T> Slice (scoped ReadOnlySpan<IntPtr> start);

Parameters

start

ReadOnlySpan<IntPtr>

The start indexes for the slice

Returns

Tensor<T> as a copy of the provided ranges.

Implements

Applies to

.NET 9 (package-provided) dan .NET 8 (package-provided)
Produk Versi
.NET 8 (package-provided), 9 (package-provided)