Fix for Feature shape mismatch error (#7715)

This commit is contained in:
Pradipta Ghosh 2022-03-03 19:06:29 +05:30 committed by GitHub
parent a92e0f6240
commit 68b6d6bbe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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