Load libary by searching possible path.
()
| 34 | |
| 35 | |
| 36 | def _load_lib(): |
| 37 | """Load libary by searching possible path.""" |
| 38 | lib_path = libinfo.find_lib_path() |
| 39 | lib = ctypes.CDLL(lib_path[0]) |
| 40 | dirname = os.path.dirname(lib_path[0]) |
| 41 | basename = os.path.basename(lib_path[0]) |
| 42 | # DMatrix functions |
| 43 | lib.DGLGetLastError.restype = ctypes.c_char_p |
| 44 | return lib, basename, dirname |
| 45 | |
| 46 | |
| 47 | # version number |