Check the return value from C API call. Parameters ---------- ret : int The return value from C API calls.
(ret)
| 34 | |
| 35 | |
| 36 | def _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 | |
| 48 | def is_numeric(obj): |
no test coverage detected