dmlc--dgl
86f28d6553
* return 1 option in scipy adjacency matrix * lint * use dgl warning * i'm an idiot * lint x2 * rename
21 行
568 B
Python
21 行
568 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, warn_type=UserWarning):
|
|
"""Print out warning messages."""
|
|
warnings.warn(msg, warn_type)
|
|
|
|
_init_internal_api()
|