Tensor.ToString Method

Definition

Overloads

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

Source:
TensorExtensions.cs

Creates a String representation of the Tensor<T>."/>

public static string ToString<T> (this System.Numerics.Tensors.Tensor<T> tensor, scoped ReadOnlySpan<IntPtr> maximumLengths);

Type Parameters

T

Parameters

tensor
Tensor<T>

The Span<T> you want to represent as a string.

maximumLengths

ReadOnlySpan<IntPtr>

Maximum Length of each dimension

Returns

A String representation of the tensor

Applies to

.NET 9 (package-provided) and .NET 8 (package-provided)
Product Versions
.NET 8 (package-provided), 9 (package-provided)

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

Source:
TensorExtensions.cs

Creates a String representation of the TensorSpan<T>."/>

public static string ToString<T> (this in System.Numerics.Tensors.TensorSpan<T> tensor, scoped ReadOnlySpan<IntPtr> maximumLengths);

Type Parameters

T

Parameters

tensor
TensorSpan<T>

The TensorSpan<T> you want to represent as a string.

maximumLengths

ReadOnlySpan<IntPtr>

Maximum Length of each dimension

Returns

A String representation of the tensor

Applies to

.NET 9 (package-provided) and .NET 8 (package-provided)
Product Versions
.NET 8 (package-provided), 9 (package-provided)

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

Source:
TensorExtensions.cs

Creates a String representation of the ReadOnlyTensorSpan<T>."/>

public static string ToString<T> (this in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, scoped ReadOnlySpan<IntPtr> maximumLengths);

Type Parameters

T

Parameters

tensor
ReadOnlyTensorSpan<T>

The ReadOnlyTensorSpan<T> you want to represent as a string.

maximumLengths

ReadOnlySpan<IntPtr>

Maximum Length of each dimension

Returns

Applies to

.NET 9 (package-provided) and .NET 8 (package-provided)
Product Versions
.NET 8 (package-provided), 9 (package-provided)