I think this is insufficient: a coo will thus raise an `AttributeError`; a CSC will run incorrectly and probably segfault.

Instead of testing, just use `X = csr_matrix(X, copy=False)`