Skip to content

Fix power 0 canonicalization#10

Merged
SteveDiamond merged 2 commits into
cvxpy:mainfrom
haozhu10015:main
Jun 1, 2026
Merged

Fix power 0 canonicalization#10
SteveDiamond merged 2 commits into
cvxpy:mainfrom
haozhu10015:main

Conversation

@haozhu10015

@haozhu10015 haozhu10015 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Fixes canonicalization for power(x, 0.0).

Previously, power canonicalization handled p == 1 specially but still routed p == 0 through the power-cone path, and introduces wrong cone structure for an expression that should simply be constant one.

The canonicalizer now returns an elementwise constant-one LinExpr with the same shape as the input.

@SteveDiamond SteveDiamond merged commit 89bb4e4 into cvxpy:main Jun 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants