import mir.ndslice; assert(iota(1, 1, 3).expand!1(3) == [[[0,1,2],[0,1,2],[0,1,2]]]); assert(iota(1, 1, 3).expand!0(2).expand!1(3) == [[[0,1,2],[0,1,2],[0,1,2]], [[0,1,2],[0,1,2],[0,1,2]]]); assert(iota(1, 3, 2).expand!0(2) == iota(3, 2).repeat(2).unpack);
expand dimension i.e. repeat n time on dim