Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix abs for 1d scalar case #30

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Fix abs for 1d scalar case #30

merged 2 commits into from
Aug 21, 2024

Conversation

jonathanberthias
Copy link
Owner

@jonathanberthias jonathanberthias commented Aug 21, 2024

Variables with shape (1,) are not treated as scalars during translation, even though they are equivalent in cvxpy. In gurobipy however, using them as optimization objective generates warnings from numpy.

Also, merge all abs tests in the same function. Otherwise, the scalar, vector and matrix containers will grow very large as more genexprs are added.

@jonathanberthias jonathanberthias added bug Something isn't working tests Improvements to tests labels Aug 21, 2024
@jonathanberthias jonathanberthias merged commit e1e8cac into main Aug 21, 2024
2 checks passed
@jonathanberthias jonathanberthias deleted the test-abs branch August 21, 2024 18:53
@jonathanberthias jonathanberthias modified the milestone: v0.2.0 Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests Improvements to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant