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>)

Source:
TensorExtensions.cs
Source:
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>)

Source:
TensorExtensions.cs
Source:
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>)

Source:
TensorExtensions.cs
Source:
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>

每个维度的最大长度

返回

适用于