Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat-multi-observable' into feat…
Browse files Browse the repository at this point in the history
…-multi-observable
  • Loading branch information
hJaffaliColibritd committed Jan 12, 2025
2 parents 92fcc47 + dc9ece7 commit a42438d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mpqp/tools/maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ def is_diagonal(matrix: Matrix):

i, j = matrix.shape
if i != j:
raise ValueError("The input matrix is not square. Dimensions = (" + i + ", " + j + ").")
raise ValueError(
"The input matrix is not square. Dimensions = (" + i + ", " + j + ")."
)
test = matrix.reshape(-1)[:-1].reshape(i - 1, j + 1)
return ~np.any(test[:, 1:])

Expand Down

0 comments on commit a42438d

Please sign in to comment.