Get callback functions for iterating in C. This is an internal function.
(self, enable_categorical: bool)
| 354 | self._data_ref: Optional[weakref.ReferenceType] = None |
| 355 | |
| 356 | def get_callbacks(self, enable_categorical: bool) -> Tuple[Callable, Callable]: |
| 357 | """Get callback functions for iterating in C. This is an internal function.""" |
| 358 | assert hasattr(self, "cache_prefix"), "__init__ is not called." |
| 359 | reset_callback = ctypes.CFUNCTYPE(None, ctypes.c_void_p)(self._reset_wrapper) |
| 360 | next_callback = ctypes.CFUNCTYPE( |
| 361 | ctypes.c_int, |
| 362 | ctypes.c_void_p, |
| 363 | )(self._next_wrapper) |
| 364 | self._enable_categorical = enable_categorical |
| 365 | return reset_callback, next_callback |
| 366 | |
| 367 | @property |
| 368 | def proxy(self) -> "_ProxyDMatrix": |
no outgoing calls
no test coverage detected