Unverified Commit f554bc48 authored by czkkkkkk's avatar czkkkkkk Committed by GitHub
Browse files

[Sparse] Polish the docstring of SparseMatrix.csr() and SparseMatrix.csc() (#5179)



* [Sparse] Polish the docstring of SparseMatrix.csr() and SparseMatrix.csc()

* Update sparse_matrix.py

* Update
Co-authored-by: default avatarHongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
parent a1a43d98
...@@ -108,8 +108,11 @@ class SparseMatrix: ...@@ -108,8 +108,11 @@ class SparseMatrix:
Returns Returns
------- -------
Tuple[torch.Tensor, torch.Tensor, torch.Tensor] Tuple[torch.Tensor, torch.Tensor, torch.Tensor]
A tuple of tensors containing row, column coordinates and value A tuple of tensors containing row indptr, column indices and value
indices indices. Value indices is an index tensor, indicating the order of
the values of non-zero elements in the CSR representation. A null
value indices indicates the order of the values stays the same as
the values of the SparseMatrix.
""" """
return self.c_sparse_matrix.csr() return self.c_sparse_matrix.csr()
...@@ -120,8 +123,11 @@ class SparseMatrix: ...@@ -120,8 +123,11 @@ class SparseMatrix:
Returns Returns
------- -------
Tuple[torch.Tensor, torch.Tensor, torch.Tensor] Tuple[torch.Tensor, torch.Tensor, torch.Tensor]
A tuple of tensors containing row, column coordinates and value A tuple of tensors containing column indptr, row indices and value
indices indices. Value indices is an index tensor, indicating the order of
the values of non-zero elements in the CSC representation. A null
value indices indicates the order of the values stays the same as
the values of the SparseMatrix.
""" """
return self.c_sparse_matrix.csc() return self.c_sparse_matrix.csc()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment