ndslice with length!dimension equal to n.
import mir.ndslice.topology : iota; auto sl = iota(3, 4); assert(sl.selectBack!1(2) == sl[0 .. $, $ - 2 .. $]);
auto a = [1, 2, 3, 4].sliced(2, 2); assert(a != [1, 2, 3, 4, 5, 6].sliced(2, 3)); assert(a != [[1, 2, 3], [4, 5, 6]]); assert(a == [1, 2, 3, 4].sliced(2, 2)); assert(a == [[1, 2], [3, 4]]); assert(a != [9, 2, 3, 4].sliced(2, 2)); assert(a != [[9, 2], [3, 4]]);
Select the last n elements for the dimension.