Fixes for numpy 2.0. (#10252)

This commit is contained in:
Jiaming Yuan
2024-05-07 03:54:32 +08:00
committed by GitHub
parent dcc9639b91
commit 73afef1a6e
12 changed files with 35 additions and 34 deletions

View File

@@ -84,7 +84,7 @@ def main(tmpdir: str) -> xgboost.Booster:
it = Iterator(files)
# For non-data arguments, specify it here once instead of passing them by the `next`
# method.
missing = np.NaN
missing = np.nan
Xy = xgboost.DMatrix(it, missing=missing, enable_categorical=False)
# ``approx`` is also supported, but less efficient due to sketching. GPU behaves