Unverified Commit bbcfa9b7 authored by Matthias Fey's avatar Matthias Fey Committed by GitHub
Browse files

Merge pull request #19 from ekagra-ranjan/master

Improve Code docs
parents 15b84133 2ca31691
...@@ -13,8 +13,8 @@ def coalesce(index, value, m, n, op='add', fill_value=0): ...@@ -13,8 +13,8 @@ def coalesce(index, value, m, n, op='add', fill_value=0):
Args: Args:
index (:class:`LongTensor`): The index tensor of sparse matrix. index (:class:`LongTensor`): The index tensor of sparse matrix.
value (:class:`Tensor`): The value tensor of sparse matrix. value (:class:`Tensor`): The value tensor of sparse matrix.
m (int): The first dimension of sparse matrix. m (int): The first dimension of corresponding dense matrix.
n (int): The second dimension of sparse matrix. n (int): The second dimension of corresponding dense matrix.
op (string, optional): The scatter operation to use. (default: op (string, optional): The scatter operation to use. (default:
:obj:`"add"`) :obj:`"add"`)
fill_value (int, optional): The initial fill value of scatter fill_value (int, optional): The initial fill value of scatter
......
...@@ -5,7 +5,7 @@ def eye(m, dtype=None, device=None): ...@@ -5,7 +5,7 @@ def eye(m, dtype=None, device=None):
"""Returns a sparse matrix with ones on the diagonal and zeros elsewhere. """Returns a sparse matrix with ones on the diagonal and zeros elsewhere.
Args: Args:
m (int): The first dimension of sparse matrix. m (int): The first dimension of corresponding dense matrix.
dtype (`torch.dtype`, optional): The desired data type of returned dtype (`torch.dtype`, optional): The desired data type of returned
value vector. (default is set by `torch.set_default_tensor_type()`) value vector. (default is set by `torch.set_default_tensor_type()`)
device (`torch.device`, optional): The desired device of returned device (`torch.device`, optional): The desired device of returned
......
...@@ -7,8 +7,8 @@ def spmm(index, value, m, n, matrix): ...@@ -7,8 +7,8 @@ def spmm(index, value, m, n, matrix):
Args: Args:
index (:class:`LongTensor`): The index tensor of sparse matrix. index (:class:`LongTensor`): The index tensor of sparse matrix.
value (:class:`Tensor`): The value tensor of sparse matrix. value (:class:`Tensor`): The value tensor of sparse matrix.
m (int): The first dimension of sparse matrix. m (int): The first dimension of corresponding dense matrix.
n (int): The second dimension of sparse matrix. n (int): The second dimension of corresponding dense matrix.
matrix (:class:`Tensor`): The dense matrix. matrix (:class:`Tensor`): The dense matrix.
:rtype: :class:`Tensor` :rtype: :class:`Tensor`
......
...@@ -16,10 +16,10 @@ def spspmm(indexA, valueA, indexB, valueB, m, k, n): ...@@ -16,10 +16,10 @@ def spspmm(indexA, valueA, indexB, valueB, m, k, n):
valueA (:class:`Tensor`): The value tensor of first sparse matrix. valueA (:class:`Tensor`): The value tensor of first sparse matrix.
indexB (:class:`LongTensor`): The index tensor of second sparse matrix. indexB (:class:`LongTensor`): The index tensor of second sparse matrix.
valueB (:class:`Tensor`): The value tensor of second sparse matrix. valueB (:class:`Tensor`): The value tensor of second sparse matrix.
m (int): The first dimension of first sparse matrix. m (int): The first dimension of first corresponding dense matrix.
k (int): The second dimension of first sparse matrix and first k (int): The second dimension of first corresponding dense matrix and first
dimension of second sparse matrix. dimension of second corresponding dense matrix.
n (int): The second dimension of second sparse matrix. n (int): The second dimension of second corresponding dense matrix.
:rtype: (:class:`LongTensor`, :class:`Tensor`) :rtype: (:class:`LongTensor`, :class:`Tensor`)
""" """
......
...@@ -8,8 +8,8 @@ def transpose(index, value, m, n): ...@@ -8,8 +8,8 @@ def transpose(index, value, m, n):
Args: Args:
index (:class:`LongTensor`): The index tensor of sparse matrix. index (:class:`LongTensor`): The index tensor of sparse matrix.
value (:class:`Tensor`): The value tensor of sparse matrix. value (:class:`Tensor`): The value tensor of sparse matrix.
m (int): The first dimension of sparse matrix. m (int): The first dimension of corresponding dense matrix.
n (int): The second dimension of sparse matrix. n (int): The second dimension of corresponding dense matrix.
:rtype: (:class:`LongTensor`, :class:`Tensor`) :rtype: (:class:`LongTensor`, :class:`Tensor`)
""" """
......
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