law from_values_replayed
import bendtorch-core@0.1.0.0/src/tensor/contracts/LAWS.bend as LAWSimport 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/lifecycle.bend as Lifecycle
import bendtorch-core@0.1.0.0/src/tensor/from_values_contract.bend as FromValues
import bendtorch-core@0.1.0.0/src/tensor/contracts/replayed.bend as Replayed
30law from_values_replayed:
31 for +shape: Shape.Shape
32 for +values: List<&2, F32>
33 for counted: {List.length(&2, F32, values) == Shape.logical_numel(Shape.dimensions(shape)) : Nat}
34 for -P: Result<&2, &1, Core.Error, Core.Tensor<shape>> -> Type
35 for h: @-fits: {Lifecycle.logical_length(Replayed.storage(shape, 0.0, FromValues.writes(values, 0n))) == Shape.logical_numel(Shape.dimensions(shape)) : Nat} ->
36 P(Done{Core.TTensor{Replayed.storage(shape, 0.0, FromValues.writes(values, 0n)), fits}})
37 P(Core.from_values(shape, values))
Uses (15)
Used by (0)
No other definition uses this definition.