def written_pick

bendtorch-core@0.1.0.0 · src/tensor/write_contract.bend:30

import bendtorch-core@0.1.0.0/src/tensor/write_contract.bend as WriteContract
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

30def written_pick(+shape: Shape.Shape, +index: U32, +value: F32, +other: U32, +fill: F32) -> F32:
31  Bool.pick(F32, Bool.and(Nat.is_lt(U32.to_nat(index), U32.to_nat(Shape.count(shape))), Nat.is_eq(U32.to_nat(index), U32.to_nat(other))), value, fill)

Uses (9)

Used by (9)