Jaa


Tensor.AsTensorSpan<T>(T[], ReadOnlySpan<IntPtr>) Method

Definition

Extension method to more easily create a TensorSpan from an array.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::TensorSpan<T> AsTensorSpan(cli::array <T> ^ array, ReadOnlySpan<IntPtr> lengths);
public static System.Numerics.Tensors.TensorSpan<T> AsTensorSpan<T> (this T[]? array, scoped ReadOnlySpan<IntPtr> lengths);
static member AsTensorSpan : 'T[] * ReadOnlySpan<nativeint> -> System.Numerics.Tensors.TensorSpan<'T>
<Extension()>
Public Function AsTensorSpan(Of T) (array As T(), lengths As ReadOnlySpan(Of IntPtr)) As TensorSpan(Of T)

Type Parameters

T

The type of the elements in the array

Parameters

array
T[]

The Array with the data

lengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

The shape for the TensorSpan<T>

Returns

Applies to