I don't think `max(ir)` will work if there are rows that are entirely made up of zeros. It looks like the size of the first dimension is stored in the `MATLAB_sparse` attribute.