def reduces
import bendtorch-core@0.1.0.0/src/autograd/sum_dims.bend as SumDimsimport Base
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
29# Whether the sum reduces axis `axis`: every axis for an empty list.
30def reduces(+axes: List<&2, U32>, +axis: U32) -> Bool:
31 match axes:
32 case Nil{}:
33 True{}
34 case +head <> +tail:
35 Layout.contains(axis, head <> tail)
Uses (4)
Used by (7)
- bendtorch-core@0.1.0.0/src/autograd/sum_dims:dropped_from
- bendtorch-core@0.1.0.0/src/autograd/sum_dims:kept_from
- bendtorch-core@0.1.0.0/src/autograd/sum_dims_LAWS:sum_dims_dropped_kept
- bendtorch-core@0.1.0.0/src/autograd/sum_dims_LAWS:sum_dims_dropped_reduced
- bendtorch-core@0.1.0.0/src/autograd/sum_dims_LAWS:sum_dims_every_axis
- …