Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
aa7e3524
Unverified
Commit
aa7e3524
authored
Dec 28, 2023
by
Rhett Ying
Committed by
GitHub
Dec 28, 2023
Browse files
[dev] fix docstring
parent
9b69ff84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
python/dgl/graphbolt/internal/sample_utils.py
python/dgl/graphbolt/internal/sample_utils.py
+3
-3
No files found.
python/dgl/graphbolt/internal/sample_utils.py
View file @
aa7e3524
...
@@ -226,8 +226,8 @@ def unique_and_compact_csc_formats(
...
@@ -226,8 +226,8 @@ def unique_and_compact_csc_formats(
... "n1": torch.LongTensor([1, 2]),
... "n1": torch.LongTensor([1, 2]),
... "n2": torch.LongTensor([5, 6])}
... "n2": torch.LongTensor([5, 6])}
>>> csc_formats = {
>>> csc_formats = {
... "n1:e1:n2": CSCFormatBase(indptr=torch.tensor([0, 2, 3]),indices=N1),
... "n1:e1:n2":
gb.
CSCFormatBase(indptr=torch.tensor([0, 2, 3]),indices=N1),
... "n2:e2:n1": CSCFormatBase(indptr=torch.tensor([0, 1, 3]),indices=N2)}
... "n2:e2:n1":
gb.
CSCFormatBase(indptr=torch.tensor([0, 1, 3]),indices=N2)}
>>> unique_nodes, compacted_csc_formats = gb.unique_and_compact_csc_formats(
>>> unique_nodes, compacted_csc_formats = gb.unique_and_compact_csc_formats(
... csc_formats, unique_dst
... csc_formats, unique_dst
... )
... )
...
@@ -340,7 +340,7 @@ def compact_csc_format(
...
@@ -340,7 +340,7 @@ def compact_csc_format(
>>> import dgl.graphbolt as gb
>>> import dgl.graphbolt as gb
>>> N1 = torch.LongTensor([1, 2, 2])
>>> N1 = torch.LongTensor([1, 2, 2])
>>> N2 = torch.LongTensor([5, 6, 5])
>>> N2 = torch.LongTensor([5, 6, 5])
>>> csc_formats = {"n2:e2:n1": CSCFormatBase(indptr=torch.tensor([0, 1]),
>>> csc_formats = {"n2:e2:n1":
gb.
CSCFormatBase(indptr=torch.tensor([0, 1]),
... indices=torch.tensor([5]))}
... indices=torch.tensor([5]))}
>>> dst_nodes = {"n1": N1[:1]}
>>> dst_nodes = {"n1": N1[:1]}
>>> original_row_node_ids, compacted_csc_formats = gb.compact_csc_format(
>>> original_row_node_ids, compacted_csc_formats = gb.compact_csc_format(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment