共用方式為


Tensor.ToString 方法

定義

多載

ToString<T>(Tensor<T>, ReadOnlySpan<IntPtr>)

建立 Tensor<T>String 表示法。/>

ToString<T>(TensorSpan<T>, ReadOnlySpan<IntPtr>)

建立 TensorSpan<T>String 表示法。/>

ToString<T>(ReadOnlyTensorSpan<T>, ReadOnlySpan<IntPtr>)

建立 ReadOnlyTensorSpan<T>String 表示法。/>

ToString<T>(Tensor<T>, ReadOnlySpan<IntPtr>)

來源:
TensorExtensions.cs
來源:
TensorExtensions.cs

建立 Tensor<T>String 表示法。/>

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::String ^ ToString(System::Numerics::Tensors::Tensor<T> ^ tensor, ReadOnlySpan<IntPtr> maximumLengths);
public static string ToString<T> (this System.Numerics.Tensors.Tensor<T> tensor, scoped ReadOnlySpan<IntPtr> maximumLengths);
static member ToString : System.Numerics.Tensors.Tensor<'T> * ReadOnlySpan<nativeint> -> string
<Extension()>
Public Function ToString(Of T) (tensor As Tensor(Of T), maximumLengths As ReadOnlySpan(Of IntPtr)) As String

類型參數

T

參數

tensor
Tensor<T>

您想要以字串表示的 Span<T>

maximumLengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

每個維度的最大長度

傳回

tensorString 表示法

適用於

ToString<T>(TensorSpan<T>, ReadOnlySpan<IntPtr>)

來源:
TensorExtensions.cs
來源:
TensorExtensions.cs

建立 TensorSpan<T>String 表示法。/>

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::String ^ ToString(System::Numerics::Tensors::TensorSpan<T> % tensor, ReadOnlySpan<IntPtr> maximumLengths);
public static string ToString<T> (this in System.Numerics.Tensors.TensorSpan<T> tensor, scoped ReadOnlySpan<IntPtr> maximumLengths);
static member ToString : TensorSpan * ReadOnlySpan<nativeint> -> string
<Extension()>
Public Function ToString(Of T) (ByRef tensor As TensorSpan(Of T), maximumLengths As ReadOnlySpan(Of IntPtr)) As String

類型參數

T

參數

tensor
TensorSpan<T>

您想要以字串表示的 TensorSpan<T>

maximumLengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

每個維度的最大長度

傳回

tensorString 表示法

適用於

ToString<T>(ReadOnlyTensorSpan<T>, ReadOnlySpan<IntPtr>)

來源:
TensorExtensions.cs
來源:
TensorExtensions.cs

建立 ReadOnlyTensorSpan<T>String 表示法。/>

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::String ^ ToString(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % tensor, ReadOnlySpan<IntPtr> maximumLengths);
public static string ToString<T> (this in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, scoped ReadOnlySpan<IntPtr> maximumLengths);
static member ToString : ReadOnlyTensorSpan * ReadOnlySpan<nativeint> -> string
<Extension()>
Public Function ToString(Of T) (ByRef tensor As ReadOnlyTensorSpan(Of T), maximumLengths As ReadOnlySpan(Of IntPtr)) As String

類型參數

T

參數

tensor
ReadOnlyTensorSpan<T>

您想要以字串表示的 ReadOnlyTensorSpan<T>

maximumLengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

每個維度的最大長度

傳回

適用於