Skip to content

Commit 4a3d3b6

Browse files
committed
Fix axis argument in matrix sum test
Replaces positional argument with explicit 'axis=2' in y.sum() to improve clarity and correctness in test_matrix_sum_argument.
1 parent 6081a65 commit 4a3d3b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_matrix_variable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test_matrix_sum_argument():
173173

174174
# sum with 3d array, set axis=2
175175
y = m.addMatrixVar((2, 3, 4), "y", "I", ub=10)
176-
m.addMatrixCons(y.sum(2) == np.zeros((2, 3)))
176+
m.addMatrixCons(y.sum(axis=2) == np.zeros((2, 3)))
177177

178178
m.optimize(x.sum() + y.sum(), "maximize")
179179

0 commit comments

Comments
 (0)