static array of dimensions type of size_t[n]
int err; size_t[2] shape = [[1, 2, 3], [4, 5, 6]].shape(err); assert(err == 0); assert(shape == [2, 3]); [[1, 2], [4, 5, 6]].shape(err); assert(err == 1);
Slice from ndarray
import mir.ndslice.allocation: slice, shape; int err; auto array = [[1, 2, 3], [4, 5, 6]]; auto s = array.shape(err).slice!int; s[] = [[1, 2, 3], [4, 5, 6]]; assert(s == array);
Shape of a common n-dimensional array.