Closed timotheecour closed 7 years ago
ndarray
converts slice to a common d array.
You may want to use following steps:
auto sh = a.shape; // computes shape, can throw `SliceException`
auto b = uninitializedSlice(sh);
b[] = a;
I will deprecate shape
and reshape
functions, so they will be nothrow
and @nogc
but an addition err
reference parameter will be added.
Duplicate of https://github.com/libmir/mir/issues/336
eg: (but of course needs to be more general in terms of a.shape.length)
NOTE:
doesn't do what i would expect