From ee7e8b6e8a143bc7c70156aa6619739978cb5faf Mon Sep 17 00:00:00 2001 From: Skipper Seabold Date: Mon, 27 Apr 2015 12:41:24 -0500 Subject: [PATCH] COMPAT: Decode bytes object for Python 3. --- wrapper/xgboost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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=''):