def columns_of

bendtorch-core@0.1.0.0 · src/tensor/batched_matmul_LAWS.bend:326

import bendtorch-core@0.1.0.0/src/tensor/batched_matmul_LAWS.bend as BatchedMatmulLAWS
import Base

326# The last extent: the columns of a matrix.
327def columns_of(dims: List<&2, Nat>) -> Nat:
328  match dims:
329    case +x <> Nil{}:
330      x
331    case +x <> +y <> tail:
332      columns_of(y <> tail)
333    case Nil{}:
334      0n

Uses (2)

Used by (1)