天天看點

成功解決xgboost\core.py:614: UserWarning: Use subset (sliced data) of np.ndarray is not recommended beca

成功解決xgboost\core.py:614: UserWarning: Use subset (sliced data) of np.ndarray is not recommended beca

目錄

解決問題

解決思路

解決方法

xgboost\core.py:614: UserWarning: Use subset (sliced data) of np.ndarray is not recommended because it will generate extra copies and increase memory consumption

  "because it will generate extra copies and increase memory consumption")

錯誤位址:xgboost\core.py:614

使用者警告:

使用np.ndarray的子集(切片資料),不推薦使用np.ndarray,因為它會生成額外的副本并增加記憶體消耗

“因為它會生成額外的副本,并增加記憶體消耗”

此資訊提示為警告,而不是error,即使不處理也不會影響代碼程式設計的運作。如果想要去掉,可以更新庫至最新版本!

然後根據要求提示修改使用方法!

在進行sliced data時,' np.ndarray '方法不再推薦使用!