Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
fra-pcmgf committed Aug 5, 2024
1 parent f810b70 commit b789260
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dyson_equalizer/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ def scale_matrix(
The normalized matrix
"""
m, n = Y.shape[-2:]
if x.shape != [m]:
raise ValueError(f"The row weights vector have the wrong shape {x.shape}")
if y.shape != [n]:
raise ValueError(f"The columns weights vector have the wrong shape {y.shape}")
if x.shape != (m, ):
raise ValueError(f"The row weights vector have the wrong shape {x.shape}, expected {(m,)}")
if y.shape != (n, ):
raise ValueError(f"The columns weights vector have the wrong shape {y.shape}, expected {(n,)}")

return x[:, None] * Y * y

Expand Down

0 comments on commit b789260

Please sign in to comment.