law broadcast_shape_error
import bendtorch-core@0.1.0.0/src/autograd/broadcast_LAWS.bend as BroadcastLAWSimport Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/elementwise_totality.bend as Totality
import bendtorch-core@0.1.0.0/src/autograd/broadcast.bend as Broadcast
84# When the broadcast planner rejects the input and target shapes, broadcast_to
85# fails with exactly that planner error and returns the input owner. For example [2] to
86# [0] fails with IncompatibleBroadcast instead of returning an empty tensor.
87law broadcast_shape_error:
88 for input: Core.Dynamic
89 for +target: Shape.Shape
90 for error: Shape.Error
91 for rejected: {Shape.broadcast_checked(Totality.dynamic_shape(input), target) == Fail{error} : Result<&2, &2, Shape.Error, Shape.BroadcastPlan>}
92 {Broadcast.broadcast_to(input, target) == (input, Fail{Broadcast.TensorError{Core.ShapeError{error}}}) : Core.Dynamic & Result<&2, &1, Broadcast.Error, Core.Dynamic>}
Uses (14)
Used by (0)
No other definition uses this definition.