Skip to content

Commit 05e8962

Browse files
Change self._num_features in ValueError message (backport #981) (#984)
* Correct `self._num_features` in ValueError (#981) (cherry picked from commit 56bbed0) * Update copyright in `base_kernel.py` --------- Co-authored-by: Edoardo Altamura <[email protected]>
1 parent 6b5a778 commit 05e8962

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiskit_machine_learning/kernels/base_kernel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This code is part of a Qiskit project.
22
#
3-
# (C) Copyright IBM 2022, 2023.
3+
# (C) Copyright IBM 2022, 2025.
44
#
55
# This code is licensed under the Apache License, Version 2.0. You may
66
# obtain a copy of this license in the LICENSE.txt file in the root directory
@@ -116,7 +116,7 @@ def _validate_input(
116116
raise ValueError(
117117
f"x_vec and class feature map have incompatible dimensions.\n"
118118
f"x_vec has {x_vec.shape[1]} dimensions, "
119-
f"but feature map has {self._feature_map.num_parameters}."
119+
f"but feature map has {self._num_features}."
120120
) from a_e
121121

122122
if y_vec is not None:

0 commit comments

Comments
 (0)