Fix for Feature shape mismatch error (#7715)
This commit is contained in:
parent
a92e0f6240
commit
68b6d6bbe2
@ -2242,7 +2242,7 @@ class Booster:
|
|||||||
|
|
||||||
def num_features(self) -> int:
|
def num_features(self) -> int:
|
||||||
'''Number of features in booster.'''
|
'''Number of features in booster.'''
|
||||||
features = ctypes.c_int()
|
features = c_bst_ulong()
|
||||||
assert self.handle is not None
|
assert self.handle is not None
|
||||||
_check_call(_LIB.XGBoosterGetNumFeature(self.handle, ctypes.byref(features)))
|
_check_call(_LIB.XGBoosterGetNumFeature(self.handle, ctypes.byref(features)))
|
||||||
return features.value
|
return features.value
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user