diff --git a/wrapper/xgboost.py b/wrapper/xgboost.py index 65117c36c..9bf8baed7 100644 --- a/wrapper/xgboost.py +++ b/wrapper/xgboost.py @@ -517,7 +517,7 @@ class Booster(object): int(with_stats), ctypes.byref(length)) res = [] for i in range(length.value): - res.append(str(sarr[i])) + res.append(str(sarr[i].decode('ascii'))) return res def get_fscore(self, fmap=''):