`np.NaN` was deprecated in the NumPy 2.0 release. Use `np.nan` instead. (#4917)

This commit is contained in:
Muspi Merol 2024-07-06 17:23:45 +08:00 committed by GitHub
parent 8ba8f4497c
commit 62e6694080
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ def test_pandas_categorical(selenium):
assert transformed.columns[0].min() == 0
# test missing value
X = pd.DataFrame({"f0": ["a", "b", np.NaN]})
X = pd.DataFrame({"f0": ["a", "b", np.nan]})
X["f0"] = X["f0"].astype("category") # type: ignore[call-overload]
arr, _, _ = xgb.data._transform_pandas_df(X, enable_categorical=True)
assert not np.any(arr == -1.0)