Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/dmlc/dgl
/ idx2mask
Function
idx2mask
python/dgl/data/utils.py:382–386 ·
view source on GitHub ↗
Create mask.
(idx, len)
Source
from the content-addressed store, hash-verified
380
381
382
def
idx2mask(idx, len):
383
""
"Create mask."
""
384
mask = np.zeros(len)
385
mask[idx] = 1
386
return
mask
387
388
389
def
generate_mask_tensor(mask):
Callers
3
add_nodepred_split
Function · 0.85
mask_nodes_by_property
Function · 0.85
process_raw_tuples
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected