MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / _safe_call

Function _safe_call

python-package/lightgbmmt/basic.py:36–45  ·  view source on GitHub ↗

Check the return value from C API call. Parameters ---------- ret : int The return value from C API calls.

(ret)

Source from the content-addressed store, hash-verified

34
35
36def _safe_call(ret):
37 """Check the return value from C API call.
38
39 Parameters
40 ----------
41 ret : int
42 The return value from C API calls.
43 """
44 if ret != 0:
45 raise LightGBMError(decode_string(_LIB.LGBM_GetLastError()))
46
47
48def is_numeric(obj):

Callers 15

__init__Method · 0.85
__del__Method · 0.85
predictMethod · 0.85
__get_num_predsMethod · 0.85
inner_predictMethod · 0.85
__pred_for_cscMethod · 0.85
_free_handleMethod · 0.85
_lazy_initMethod · 0.85
__init_from_np2dMethod · 0.85
__init_from_list_np2dMethod · 0.85
__init_from_csrMethod · 0.85
__init_from_cscMethod · 0.85

Calls 2

LightGBMErrorClass · 0.85
decode_stringFunction · 0.85

Tested by

no test coverage detected