squeeze

squeeze/remove redundant size-1 dimension (axis) d

squeeze
(
size_t d
T
size_t dim
alias Storage
)
(
Variable!(T, dim, Storage) x
)

Examples

import mir.ndslice;
auto x = iota(3, 4, 1, 5).as!double.slice.variable;
assert(x.squeeze!2.shape == [3, 4, 5]);

Meta