dmlc--dgl
ca2a7e1ca1
* enable cython * add helper function and data structure for void_p vector return * move sampler from graph index to contrib.sampling * WIP * WIP * refactor layer sampling * pass tests * fix lint * fix graphsage * remove comments * pickle test * fix comments * update dev guide for cython build
21 行
534 B
Python
21 行
534 B
Python
"""Module for base types and utilities."""
|
|
from __future__ import absolute_import
|
|
|
|
import warnings
|
|
|
|
from ._ffi.base import DGLError # pylint: disable=unused-import
|
|
from ._ffi.function import _init_internal_api
|
|
|
|
# A special symbol for selecting all nodes or edges.
|
|
ALL = "__ALL__"
|
|
|
|
def is_all(arg):
|
|
"""Return true if the argument is a special symbol for all nodes or edges."""
|
|
return isinstance(arg, str) and arg == ALL
|
|
|
|
def dgl_warning(msg):
|
|
"""Print out warning messages."""
|
|
warnings.warn(msg)
|
|
|
|
_init_internal_api()
|