sprand: handle all-zero matrix without error