parameters: (X)
docstring: Raises a TypeError if X is not a CSR or CSC matrix
docstring_summary: Raises a TypeError if X is not a CSR or CSC matrix
docstring_tokens: Raises a TypeError if X is not a CSR or CSC matrix
function: def _raise_typeerror(X):
      """Raises a TypeError if X is not a CSR or CSC matrix"""
      input_type = X.format if sp.issparse(X) else type(X)
      err = "Expected a CSR or CSC sparse matrix, got %s." % input_type
      raise TypeError(err)
function_tokens: def _raise_typeerror ( X ) : input_type = X . format if sp . issparse ( X ) else type ( X ) err = "Expected a CSR or CSC sparse matrix, got %s." % input_type raise TypeError ( err )