TensorSpan<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>) |
Returns a reference to specified element of the TensorSpan. |
Slice(ReadOnlySpan<NRange>) |
Forms a slice out of the given span. |
Slice(ReadOnlySpan<NIndex>)
- Source:
- TensorSpan.cs
- Source:
- TensorSpan.cs
Returns a reference to specified element of the TensorSpan.
public:
System::Numerics::Tensors::TensorSpan<T> Slice(ReadOnlySpan<System::Buffers::NIndex> indexes);
public System.Numerics.Tensors.TensorSpan<T> Slice(scoped ReadOnlySpan<System.Buffers.NIndex> indexes);
member this.Slice : ReadOnlySpan<System.Buffers.NIndex> -> System.Numerics.Tensors.TensorSpan<'T>
Public Function Slice (indexes As ReadOnlySpan(Of NIndex)) As TensorSpan(Of T)
Parameters
- indexes
- ReadOnlySpan<NIndex>
The indexes for the slice.
Returns
Exceptions
Any index is less than 0 or greater than or equal to FlattenedLength
.
Applies to
Slice(ReadOnlySpan<NRange>)
- Source:
- TensorSpan.cs
- Source:
- TensorSpan.cs
Forms a slice out of the given span.
public:
System::Numerics::Tensors::TensorSpan<T> Slice(ReadOnlySpan<System::Buffers::NRange> ranges);
public System.Numerics.Tensors.TensorSpan<T> Slice(scoped ReadOnlySpan<System.Buffers.NRange> ranges);
member this.Slice : ReadOnlySpan<System.Buffers.NRange> -> System.Numerics.Tensors.TensorSpan<'T>
Public Function Slice (ranges As ReadOnlySpan(Of NRange)) As TensorSpan(Of T)
Parameters
- ranges
- ReadOnlySpan<NRange>
The ranges for the slice.
Returns
A ReadOnlyTensorSpan<T> based on the provided ranges
.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.