Wrapper to get an array.
(device: Device, data: Any)
| 42 | |
| 43 | |
| 44 | def asarray(device: Device, data: Any) -> np.ndarray: |
| 45 | """Wrapper to get an array.""" |
| 46 | if device == "cpu": |
| 47 | return np.asarray(data) |
| 48 | import cupy as cp |
| 49 | |
| 50 | return cp.asarray(data) |
| 51 | |
| 52 | |
| 53 | def comp_booster(device: Device, Xy: DMatrix, booster: str) -> None: |
no outgoing calls
no test coverage detected