Skip to content

Commit cfa89b3

Browse files
committed
use f-string for error message
1 parent 148a361 commit cfa89b3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pydmd/bopdmd.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,11 @@ def fit_econ(self, s, V, t):
15061506
or self._proj_basis.ndim != 2
15071507
or self._proj_basis.shape[1] != self._svd_rank
15081508
):
1509-
msg = "proj_basis must be a 2D np.ndarray with {} columns."
1510-
raise ValueError(msg.format(self._svd_rank))
1509+
msg = (
1510+
"proj_basis must be a 2D np.ndarray with "
1511+
f"{self._svd_rank} columns."
1512+
)
1513+
raise ValueError(msg)
15111514

15121515
# Check that input time vector is one-dimensional.
15131516
if self._time.ndim > 1:

0 commit comments

Comments
 (0)