MCPcopy Index your code
hub / github.com/dmlc/dgl / foo

Function foo

tests/python/common/function/test_basics.py:527–530  ·  view source on GitHub ↗
(g)

Source from the content-addressed store, hash-verified

525
526 # test override
527 def foo(g):
528 g = g.local_var()
529 g.ndata["h"] = F.ones((g.num_nodes(), 3))
530 g.edata["w"] = F.ones((g.num_edges(), 4))
531
532 foo(g)
533 assert F.allclose(g.ndata["h"], F.zeros((g.num_nodes(), 3)))

Callers 2

test_local_varFunction · 0.70
test_local_scopeFunction · 0.70

Calls 6

local_varMethod · 0.80
apply_nodesMethod · 0.80
local_scopeMethod · 0.80
num_nodesMethod · 0.45
num_edgesMethod · 0.45
apply_edgesMethod · 0.45

Tested by

no test coverage detected