Читати англійською

Поділитися через


Tensor.GetSmallestBroadcastableLengths Method

Definition

Gets the smallest broadcastable lengths for two shapes.

C#
public static IntPtr[] GetSmallestBroadcastableLengths(ReadOnlySpan<IntPtr> shape1, ReadOnlySpan<IntPtr> shape2);

Parameters

shape1

ReadOnlySpan<IntPtr>

The first shape to broadcast.

shape2

ReadOnlySpan<IntPtr>

The second shape to broadcast.

Returns

IntPtr[]

The smallest lengths these shapes can be broadcast to.

Exceptions

The lengths of shape1 and shape2 are not broadcast compatible.

Applies to

Продукт Версії
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)