Statistics functions `max` and `min` now return the max and min of the flattened array in case of multidimensional arrays.