def resized

bendtorch-core@0.1.0.0 · src/tensor/slice.bend:122

import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice
import Base

122# The input dimensions with the extent at the axis replaced.
123def resized(dimensions: List<&2, U32>, +dim: Nat, +extent: U32) -> List<&2, U32>:
124  match dimensions dim:
125    case head <> rest 0n:
126      extent <> rest
127    case head <> rest 1n+next:
128      head <> resized(rest, next, extent)
129    case Nil{} _:
130      Nil{}

Uses (3)

Used by (8)