broadcasted slice. For example, when a has its shape [a, 1] and b has [1, b], this function returns expanded a and b with a broadcasted shape [a, b].
import mir.ndslice; auto a = iota(1, 3, 1); auto b = iota(1, 1, 2); auto x = broadcast(a, b); assert(broadcast(a, b)[0] == a.expand!2(2)); assert(broadcast(a, b)[1] == b.expand!1(3));