src/tensor/from_values_contract_LAWS.bend
1import Base
2import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
3import bendtorch-core@0.1.0.0/src/tensor/from_values_records.bend as Records
4
5law from_values_contract:
6 for +shape: Shape.Shape
7 for +values: List<&2, F32>
8 for counted: {List.length(&2, F32, values) == Shape.logical_numel(Shape.dimensions(shape)) : Nat}
9 Records.FromValuesContract<shape, values>