The result of `transform` would be an `(n_samples, 0)` array or a crash in `scipy.sparse`. I figured I'd better handle it here.