Construct a new slice, filled with ones, of element type E and shape(lengths ...).
elements of shape
new ones slice
import mir.algorithm.iteration : all; // ------- // | 1 1 1 | // | 1 1 1 | // ------- auto o = ones(2, 3); assert(o.all!(x => x == 1)); assert(o.shape == [2, 3]); assert(o == ones([2, 3]));
See Implementation
Construct a new slice, filled with ones, of element type E and shape(lengths ...).