Skip to content

update docs for sparse tensor#12221

Closed
weiyangfb wants to merge 3 commits intopytorch:masterfrom
weiyangfb:update_doc_example_sparse_tensor
Closed

update docs for sparse tensor#12221
weiyangfb wants to merge 3 commits intopytorch:masterfrom
weiyangfb:update_doc_example_sparse_tensor

Conversation

@weiyangfb
Copy link
Copy Markdown
Contributor

  • update docs examples at sparse tensor after print format changed
  • update example to create empty sparse tensor:
>>> torch.sparse_coo_tensor(torch.LongTensor(size=[1,0]), [], torch.Size([1]))
tensor(indices=tensor([], size=(1, 0)),
       values=tensor([], size=(0,)),
       size=(1,), nnz=0, layout=torch.sparse_coo)

@zou3519 @ssnl @yf225

Comment thread torch/_torch_docs.py Outdated

This comment was marked as off-topic.

This comment was marked as off-topic.

Comment thread torch/_torch_docs.py Outdated

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Comment thread torch/_torch_docs.py Outdated

This comment was marked as off-topic.

Comment thread torch/_torch_docs.py Outdated

This comment was marked as off-topic.

Comment thread torch/_torch_docs.py Outdated

This comment was marked as off-topic.

@weiyangfb weiyangfb force-pushed the update_doc_example_sparse_tensor branch 2 times, most recently from 5b6a01c to fdd8051 Compare October 9, 2018 01:33
@weiyangfb
Copy link
Copy Markdown
Contributor Author

@ssnl is this ready to go?

Comment thread torch/_torch_docs.py Outdated

This comment was marked as off-topic.

Comment thread torch/_torch_docs.py Outdated

This comment was marked as off-topic.

Comment thread torch/_torch_docs.py Outdated

This comment was marked as off-topic.

@weiyangfb weiyangfb force-pushed the update_doc_example_sparse_tensor branch from fdd8051 to 8df03ad Compare October 16, 2018 02:59
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weiyangfb is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weiyangfb has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ezyang ezyang added the merged label Jun 26, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
- update docs examples at sparse tensor after print format changed
- update example to create empty sparse tensor:
```
>>> torch.sparse_coo_tensor(torch.LongTensor(size=[1,0]), [], torch.Size([1]))
tensor(indices=tensor([], size=(1, 0)),
       values=tensor([], size=(0,)),
       size=(1,), nnz=0, layout=torch.sparse_coo)
```

zou3519 SsnL yf225
Pull Request resolved: pytorch#12221

Differential Revision: D10412447

Pulled By: weiyangfb

fbshipit-source-id: 155b8cb0965f060e978f12239abdc1b3b41f6ab0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants