I am not familiar with these ufunc min/max forms, nor with `reduceat` (I need to brush up on my ufuncs). But I think you're right that it's possible, and I'd like to see iteration through slices avoided when possible. We could try:
```python
x = np.minimum.reduceat(mat.data, mat.indptr[:-1])
d = np.diff(mat.indptr)
x = np.minimum(x, 0, where=d < N)
x[d == 0] = 0
```
which I *think* is logically equivalent, but produces a dense results, performs unnecessary `min`s on single elements, etc.