We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a326e2 commit 0df9ebeCopy full SHA for 0df9ebe
1 file changed
test/oceancolour/test_qaa.py
@@ -128,10 +128,10 @@ def diagonalize(U: np.ndarray) -> np.ndarray: # noqa: N806
128
"""
129
return np.stack(
130
[
131
- np.diag(
132
- U[i].reshape((-1, np.prod(U.shape[1 + U.ndim // 2 :])))
133
- ).reshape(U.shape[1 + U.ndim // 2 :])
134
- for i in range(U.shape[0])
+ np.diag(_.reshape((np.prod(_.shape[_.ndim // 2 :]), -1))).reshape(
+ _.shape[_.ndim // 2 :]
+ )
+ for _ in U
135
]
136
)
137
0 commit comments