Elementwise.zero_left: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise Lines 287-294 of bendtorch-core@0.1.0.0/src/tensor/elementwise.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&start_line=287&end_line=294 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape # Whether the left input's stride is 0 on every axis, as for a rank-0 # input, so that every position walks to slot 0. def zero_left(rows: List<&2, Shape.Row>) -> Bool: match rows: case Shape.Row{stride, +left, right} <> rest: Bool.and(Nat.is_eq(left, 0n), zero_left(rest)) case Nil{}: True{} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Row