def projection_checked.fits

bendtorch-core@0.1.0.0 · src/shape/core.bend:890

import bendtorch-core@0.1.0.0/src/shape/core.bend as Core
import Base

890def projection_checked.fits(+input: Shape, -output: Shape, +values: List<&2, U32>, verdict: BoolCase<fit_words(dimensions(output), values)>) -> Result<&2, &2, Error, CheckedCoordinate<input>>:
891  match verdict:
892    case BFalse{equal}:
893      Fail{CoordinateOutOfBounds{}}
894    case BTrue{equal}:
895      coordinate_checked.nat(input, projected_words(dimensions(input), List.drop(&2, U32, values, Nat.sub(rank_dimensions(values), rank_dimensions(dimensions(input))))))

Uses (14)

Used by (3)