ndim

Returns the number of dimensions of a slice.

size_t
ndim
(
S
)
(
S s
)
if (
isSlice!S
)

Parameters

s S

n-dimensional slice

Return Value

Type: size_t

number of dimensions

Examples

import mir.ndslice.topology : iota;

auto e = iota(2, 3, 1, 3);
assert(e.ndim == 4);

Meta