def with_rank

stelliferous@0.0.2.0 · tensor_shape.bend:73

import stelliferous@0.0.2.0/tensor_shape.bend as TensorShape
import Base

73# The extents with leading axes of extent 1 added up to rank.
74def with_rank(+extents: List<&2,U32>,rank: Nat) -> List<&2,U32>:
75  List.append(&2,U32,List.replicate(U32,Nat.sub(rank,List.length(&2,U32,extents)),1),extents)

Uses (7)

Used by (1)