Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix expected shape in matrix sum test
Updated the assertion in test_matrix_sum_argument to expect shape (1,) instead of (1, 1) when summing along axis 0. This aligns the test with the actual output of the sum operation.
  • Loading branch information
Zeroto521 committed Oct 9, 2025
commit 6fb8c0d8d4db9445c577d654925112c9b80446be
2 changes: 1 addition & 1 deletion tests/test_matrix_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_matrix_sum_argument():

# Return a array when axis isn't None
res = m.addMatrixVar((3, 1)).sum(axis=0)
assert isinstance(res, MatrixExpr) and res.shape == (1, 1)
assert isinstance(res, MatrixExpr) and res.shape == (1,)

# compare the result of summing 2d array to a scalar with a scalar
x = m.addMatrixVar((2, 3), "x", "I", ub=4)
Expand Down
Loading