Clarify Tensor.is_sparse doc (#98408)

That it returns true only for COO matrix

Pull Request resolved: https://github.com/pytorch/pytorch/pull/98408
Approved by: https://github.com/cpuhrsch
This commit is contained in:
Nikita Shulga
2023-04-05 16:42:19 +00:00
committed by PyTorch MergeBot
parent d1de5f5f0d
commit 49c130256d

View File

@ -6590,7 +6590,7 @@ Is ``True`` if the Tensor is stored on the MPS device, ``False`` otherwise.
add_docstr_all(
"is_sparse",
r"""
Is ``True`` if the Tensor uses sparse storage layout, ``False`` otherwise.
Is ``True`` if the Tensor uses sparse COO storage layout, ``False`` otherwise.
""",
)