Fix for Feature shape mismatch error (#7715)

This commit is contained in:
Pradipta Ghosh
2022-03-03 21:36:29 +08:00
committed by GitHub
parent a92e0f6240
commit 68b6d6bbe2
+1 -1
View File
@@ -2242,7 +2242,7 @@ class Booster:
def num_features(self) -> int:
'''Number of features in booster.'''
features = ctypes.c_int()
features = c_bst_ulong()
assert self.handle is not None
_check_call(_LIB.XGBoosterGetNumFeature(self.handle, ctypes.byref(features)))
return features.value