MCPcopy
hub / github.com/dmlc/dgl / zero_index

Function zero_index

python/dgl/utils/internal.py:307–317  ·  view source on GitHub ↗

Create a index with provided size initialized to zero Parameters ---------- size: int

(size, dtype="int64")

Source from the content-addressed store, hash-verified

305
306
307def zero_index(size, dtype="int64"):
308 """Create a index with provided size initialized to zero
309
310 Parameters
311 ----------
312 size: int
313 """
314 return Index(
315 F.zeros((size,), dtype=F.data_type_dict[dtype], ctx=F.cpu()),
316 dtype=dtype,
317 )
318
319
320def set_diff(ar1, ar2):

Callers

nothing calls this directly

Calls 2

IndexClass · 0.85
cpuMethod · 0.45

Tested by

no test coverage detected