def shape_complete
bendtorch-core@0.1.0.0 · src/tensor/reshape_contract.bend:22
import bendtorch-core@0.1.0.0/src/tensor/reshape_contract.bend as ReshapeContract
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as ShapeLaws
22def shape_complete(+shape: Shape.Shape) ->
23 {ShapeLaws.built(Shape.dimensions(shape), Shape.construct(Shape.dimensions(shape))) == Some{Shape.dimensions(shape)} : Maybe<&2, List<&2, U32>>}:
24 match shape:
25 case Shape.SShape{+dimensions, size, exact, rank_bound, capacity_bound}:
26 ShapeLaws.construction_complete(dimensions, rank_bound, capacity_bound)