From c0597ef13e14614e394b271fb7d8838c4f612a7e Mon Sep 17 00:00:00 2001 From: code-review-doctor Date: Sun, 24 Apr 2022 17:33:25 +0100 Subject: [PATCH] Fix issue probably-meant-fstring found at https://codereview.doctor --- prml/rv/bernoulli.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/prml/rv/bernoulli.py b/prml/rv/bernoulli.py index f36206652..fd1ec1b30 100644 --- a/prml/rv/bernoulli.py +++ b/prml/rv/bernoulli.py @@ -74,9 +74,7 @@ def _fit(self, X): def _ml(self, X): n_zeros = np.count_nonzero((X == 0).astype(np.int)) n_ones = np.count_nonzero((X == 1).astype(np.int)) - assert X.size == n_zeros + n_ones, ( - "{X.size} is not equal to {n_zeros} plus {n_ones}" - ) + assert X.size == n_zeros + n_ones, f"{X.size} is not equal to {n_zeros} plus {n_ones}" self.mu = np.mean(X, axis=0) def _map(self, X):