Fixed incorrect feature mismatch error message (#6949)
data.shape[0] denotes the number of samples, data.shape[1] is the number of features
This commit is contained in:
parent
90cd724be1
commit
2a9979e256
@ -1907,7 +1907,7 @@ class Booster(object):
|
||||
if len(data.shape) != 1 and self.num_features() != data.shape[1]:
|
||||
raise ValueError(
|
||||
f"Feature shape mismatch, expected: {self.num_features()}, "
|
||||
f"got {data.shape[0]}"
|
||||
f"got {data.shape[1]}"
|
||||
)
|
||||
|
||||
if isinstance(data, np.ndarray):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user