fix flake8; restore raised error type
@@ -103,8 +103,7 @@ class coo_matrix(sparse_data._data_matrix):
has_canonical_format = False
else:
- raise ValueError(
- 'Only (data, (row, col)) format is supported')
+ raise TypeError('invalid input format')
if dtype is None:
dtype = data.dtype
@@ -323,8 +322,6 @@ class coo_matrix(sparse_data._data_matrix):
x = self.T.tocsr().T
x._has_canonical_format = True
return x
- #return self.T.tocsr().T
-
def tocsr(self, copy=False):
"""Converts the matrix to Compressed Sparse Row format.
@@ -344,12 +341,10 @@ class coo_matrix(sparse_data._data_matrix):
# copy is ignored because coosort method breaks an original.
x = self.copy()
cusparse.coosort(x)
- #return cusparse.coo2csr(x)
x = cusparse.coo2csr(x)
x._has_canonical_format = True
return x
-
def transpose(self, axes=None, copy=False):
"""Returns a transpose matrix.
