def length

bendtorch-core@0.1.0.0 · src/tensor/slice.bend:66

import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice
import Base

66# The length of the sliced axis: the number of indices start', start' +
67# step, ... below stop'.
68def length(+clamped: Bounds, +step: Nat) -> Nat:
69  Bounds{+low, +high} = clamped
70  counted(Nat.sub(high, low), step)

Uses (4)

Used by (5)