IReadOnlyTensor<TSelf,T>.Slice Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Slice(ReadOnlySpan<NIndex>) |
Slices the tensor using the specified start indexes. |
Slice(ReadOnlySpan<NRange>) |
Gets a slice out of the current tensor that contains a specified range. |
Slice(ReadOnlySpan<IntPtr>) |
Forms a slice out of the current tensor that begins at a specified index. |
Slice(ReadOnlySpan<NIndex>)
- Source:
- IReadOnlyTensor_1.cs
- Source:
- IReadOnlyTensor.cs
Slices the tensor using the specified start indexes.
public:
TSelf Slice(ReadOnlySpan<System::Buffers::NIndex> startIndexes);
public TSelf Slice(scoped ReadOnlySpan<System.Buffers.NIndex> startIndexes);
abstract member Slice : ReadOnlySpan<System.Buffers.NIndex> -> 'Self
Public Function Slice (startIndexes As ReadOnlySpan(Of NIndex)) As TSelf
Parameters
- startIndexes
- ReadOnlySpan<NIndex>
The indexes at which to begin the slice.
Returns
The sliced tensor.
Applies to
Slice(ReadOnlySpan<NRange>)
- Source:
- IReadOnlyTensor_1.cs
- Source:
- IReadOnlyTensor.cs
Gets a slice out of the current tensor that contains a specified range.
public:
TSelf Slice(ReadOnlySpan<System::Buffers::NRange> ranges);
public TSelf Slice(scoped ReadOnlySpan<System.Buffers.NRange> ranges);
abstract member Slice : ReadOnlySpan<System.Buffers.NRange> -> 'Self
Public Function Slice (ranges As ReadOnlySpan(Of NRange)) As TSelf
Parameters
- ranges
- ReadOnlySpan<NRange>
The range of which to slice.
Returns
A tensor that consists of all elements of the current tensor in ranges
.
Exceptions
ranges
is larger than the tensor.
Applies to
Slice(ReadOnlySpan<IntPtr>)
- Source:
- IReadOnlyTensor_1.cs
- Source:
- IReadOnlyTensor.cs
Forms a slice out of the current tensor that begins at a specified index.
public:
TSelf Slice(ReadOnlySpan<IntPtr> startIndexes);
public TSelf Slice(scoped ReadOnlySpan<IntPtr> startIndexes);
abstract member Slice : ReadOnlySpan<nativeint> -> 'Self
Public Function Slice (startIndexes As ReadOnlySpan(Of IntPtr)) As TSelf
Parameters
- startIndexes
-
ReadOnlySpan<nativeint>
The indexes at which to begin the slice.
Returns
A tensor that consists of all elements of the current tensor from startIndexes
to the end of the tensor.
Exceptions
startIndexes
is greater than the number of items in the tensor.