You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: Speed up MatrixVariable.sum(axis=None) via quicksum (#1078)
* Speed up `matrix.sum`
* Add test for sum with axis in matrix variable
Added a test to verify that summing a matrix variable with axis=0 returns a MatrixExpr with the expected shape. This improves coverage for matrix sum operations with axis specified.
* Add matrix sum performance test
Introduced a new test to compare performance of matrix sum versus element-wise sum. Refactored imports for clarity and consistency. Renamed performance test for better description.
* Use a more large size data
* Fix variable naming in test_sum_performance
Renamed the Model instance from 'm' to 'model' to avoid confusion with the integer variable 'm' and improve code clarity in the test_sum_performance function.
* Fix variable name in performance test assertion
Replaces incorrect usage of 'm' with 'model' in the assertion within test_sum_performance to ensure the correct object is referenced.
* 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.
* Update CHANGELOG.md
* Adjust performance test assertion in matrix variable tests
Modified the assertion in test_sum_performance to compare orig_time + 1 with matrix_time instead of orig_time. This may address timing precision or test flakiness.
* Try a bigger data size
* Compare `np.sum` and `quicksum`
* Try a bigger size
---------
Co-authored-by: João Dionísio <57299939+Joao-Dionisio@users.noreply.github.com>
0 commit comments