def to_list_count_len
bend-ml-tensor-array@0.1.19.0 · main.bend:1876
import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArray
import Base
1876
1877def to_list_count_len(-r: Nat, -c: Nat, d: Array<F32>, +n: Nat) -> {ML.len(r, c, Mat.to_list_count(r, c, d, n)) == n : Nat}:
1878 match n:
1879 case 0n:
1880 {==}
1881 case 1n+p:
1882 zero_out(ML.len(r, c, Mat.to_list_count(r, c, d, 1n+p)), 1n+p, read_ml_len(r, c, p, (U32.from_nat(1n+p) - 1 : U32), Nil{}, Array.get(F32, d, (U32.from_nat(1n+p) - 1 : U32))))