TensorShape.TryBroadcast Method

Attempts to compute the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
public static bool TryBroadcast(
	TensorShape shape1,
	TensorShape shape2,
	out TensorShape result
)

Parameters

shape1  TensorShape
The shape of the first operand.
shape2  TensorShape
The shape of the second operand.
result  TensorShape
On return, the broadcast shape.

Return Value

Boolean
true if the shapes are compatible and the broadcast shape was computed; otherwise false.

See Also