Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/dmlc/dgl
/ _sample_mask
Function
_sample_mask
python/dgl/data/citation_graph.py:333–337 ·
view source on GitHub ↗
Create mask.
(idx, l)
Source
from the content-addressed store, hash-verified
331
332
333
def
_sample_mask(idx, l):
334
""
"Create mask."
""
335
mask = np.zeros(l)
336
mask[idx] = 1
337
return
mask
338
339
340
class
CoraGraphDataset(CitationGraphDataset):
Callers
1
process
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected