成功解决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 '方法不再推荐使用!



相关文章
|
11月前
|
PyTorch 算法框架/工具 开发者
RuntimeError: Can‘t call numpy() on Variable that requires grad. Use var.detach().numpy()
出现这个现象的原因是:待转换类型的PyTorch Tensor变量带有梯度,直接将其转换为numpy数据将破坏计算图,因此numpy拒绝进行数据转换,实际上这是对开发者的一种提醒。如果自己在转换数据时不需要保留梯度信息,可以在变量转换之前添加detach()调用。
130 0
|
11月前
|
并行计算 Python
TypeError: can‘t convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory
运行程序,出现报错信息 TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.。
244 0
|
TensorFlow API 算法框架/工具
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
251 0
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
|
Python
解决ImportError: umap.plot requires pandas matplotlib datashader bokeh holoviews scikit-image and colo
解决ImportError: umap.plot requires pandas matplotlib datashader bokeh holoviews scikit-image and colo
212 0
解决ImportError: umap.plot requires pandas matplotlib datashader bokeh holoviews scikit-image and colo
|
网络虚拟化
在torch_geometric.datasets中使用Planetoid手动导入Core数据集及发生相关错误解决方案
在torch_geometric.datasets中使用Planetoid手动导入Core数据集及发生相关错误解决方案
599 0
在torch_geometric.datasets中使用Planetoid手动导入Core数据集及发生相关错误解决方案
from sklearn.cross_validation import train_test_split发生报错
from sklearn.cross_validation import train_test_split发生报错
224 0
from sklearn.cross_validation import train_test_split发生报错
成功解决sklearn\ensemble\weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an interna
成功解决sklearn\ensemble\weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an interna
成功解决sklearn\preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is amb
成功解决sklearn\preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is amb
成功解决xgboost\core.py", ValueError: feature_names may not contain [, ] or <
成功解决xgboost\core.py", ValueError: feature_names may not contain [, ] or <
|
TensorFlow 算法框架/工具
成功解决AttributeError: module 'tensorflow.python.training.training' has no attribute 'SummaryWriter'
成功解决AttributeError: module 'tensorflow.python.training.training' has no attribute 'SummaryWriter'