Fix DMatrix slice with feature types. (#6689)

This commit is contained in:
Jiaming Yuan
2021-02-09 08:13:51 +08:00
committed by GitHub
parent 218a5fb6dd
commit 5d48d40d9a
2 changed files with 13 additions and 2 deletions

View File

@@ -301,6 +301,7 @@ MetaInfo MetaInfo::Slice(common::Span<int32_t const> ridxs) const {
out.feature_weigths.Copy(this->feature_weigths);
out.feature_names = this->feature_names;
out.feature_types.Resize(this->feature_types.Size());
out.feature_types.Copy(this->feature_types);
out.feature_type_names = this->feature_type_names;