Skip to content

Commit

Permalink
Move to c++.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Dec 15, 2020
1 parent a59daaa commit 29e6de4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions python-package/xgboost/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,6 @@ def slice(
ctypes.c_int(1 if allow_groups else 0),
)
)
res.feature_names = self.feature_names
res.feature_types = self.feature_types
return res

@property
Expand Down
5 changes: 5 additions & 0 deletions src/data/data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ MetaInfo MetaInfo::Slice(common::Span<int32_t const> ridxs) const {

out.feature_weigths.Resize(this->feature_weigths.Size());
out.feature_weigths.Copy(this->feature_weigths);

out.feature_names = this->feature_names;
out.feature_types.Copy(this->feature_types);
out.feature_type_names = this->feature_type_names;

return out;
}

Expand Down

0 comments on commit 29e6de4

Please sign in to comment.