Fix with None input. (#10052)

This commit is contained in:
Jiaming Yuan
2024-02-20 22:34:22 +08:00
committed by GitHub
parent d37b83e8d9
commit 69a17d5114
4 changed files with 29 additions and 12 deletions

View File

@@ -202,7 +202,10 @@ class TestFromCupy:
n = 100
X = cp.random.random((n, 2))
m = xgb.QuantileDMatrix(X.toDlpack())
with pytest.raises(xgb.core.XGBoostError):
with pytest.raises(
xgb.core.XGBoostError, match="Slicing DMatrix is not supported"
):
m.slice(rindex=[0, 1, 2])
@pytest.mark.skipif(**tm.no_cupy())