Skip to content

Commit 3ca9b36

Browse files
committed
raise error in prod if axis is not recognized
1 parent 0cc34a6 commit 3ca9b36

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • cvxpy/reductions/solvers/nlp_solvers/diff_engine

cvxpy/reductions/solvers/nlp_solvers/diff_engine/registry.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ def convert_prod(expr, children):
185185
return _diffengine.make_prod_axis_zero(children[0])
186186
elif axis == 1:
187187
return _diffengine.make_prod_axis_one(children[0])
188+
else:
189+
raise NotImplementedError(f"prod with axis={axis} not supported in DNLP")
188190

189191
def convert_transpose(expr, children):
190192
# 1D transpose is a numpy no-op; C stores 1D as (1, n), don't flip to (n, 1).

0 commit comments

Comments
 (0)