diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -7,7 +7,7 @@ def normalize_rows(matrix: np.ndarray) -> np.ndarray:
     Rows with zero norm are left as zeros.
     """
-    norms = np.linalg.norm(matrix, axis=1)
+    norms = np.linalg.norm(matrix, axis=1, keepdims=True)
     # Bug: norms has shape (N,) without keepdims, so division broadcasts
     # incorrectly against (N, M) — numpy silently broadcasts (N,) as (1, N)
     # when dividing (N, M) by (N,) it works row-wise by accident for square
