def broadcast_same_rank

stelliferous@0.0.2.0 · tensor_shape.bend:66

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

66def broadcast_same_rank(left: List<&2,U32>,right: List<&2,U32>) -> Maybe<&2,List<&2,U32>>:
67  match left right:
68    case Nil{} Nil{}: Some{[]}
69    case Con{+x,xs} Con{+y,ys}:
70      prepend_extent(broadcast_extent(U32.is_eq(x,y),U32.is_eq(x,1),U32.is_eq(y,1),x,y),broadcast_same_rank(xs,ys))
71    case left right: None{}

Uses (6)

Used by (1)