```
if N == 0:
    raise ValueError("zero-size array to reduction operation")
```
should probably also be added, to match the behavior of np.max/np.min.