To find the maximum value in an ndslice u, we can use mir's maxIndex:
but it would be nice to have the functions maxElement and minElement directly implemented in mir. It's not possible to use these functions from std.algorithm (the complaint is that opCmd is not defined), unless doing u.flattened.maxElement.
It doesn't sound like much but it would allow to more easily write code that can apply to both standard D dynamic arrays and ndslices.
Here is my use case: in numerical computation (e.g. errors) we often need to find the maximum absolute value of an ndslice. This can be achieved both with dynamic arrays (were it not for this bug) and ndslices with
u[u.map!fabs.maxIndex].fabs
but it's pretty heavy and not as readable compared to
Thanks!