import numir; import mir.ndslice; auto s = iota(3, 4); auto t = s.ndStrided(2, 3); // [[[[1, 2, 2]], [[4, 5, 5]]], [[[7, 8, 8]], [[10, 11, 11]]]] auto d = s.slice.zeros_like; sumNdStrided(s.ndStrided(2, 3).slice, d, [2, 3]); assert(d == [[22, 0, 0, 14], [0, 0, 0, 0], [19, 0, 0, 11]]);