cosmetics: I would rather the more explicit: `not sp.issparse(X)` assuming `scipy.sparse` is imported as `sp`.