def unique

bendtorch-core@0.1.0.0 · src/tensor/layout.bend:20

import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
import Base

20def unique(axes: List<&2, U32>) -> Bool:
21  match axes:
22    case Nil{}:
23      True{}
24    case +head <> +tail:
25      Bool.and(Bool.not(contains(head, tail)), unique(tail))

Uses (6)

Used by (23)