Files
app-store-optimization/skills/loki-mode/benchmarks/results/2026-01-05-10-37-54/swebench-loki-patches/sympy__sympy-21847.patch

24 lines
1015 B
Diff

# sympy__sympy-21847
# Loki Mode Multi-Agent Patch
# Attempts: 1
--- a/sympy/polys/monomials.py
+++ b/sympy/polys/monomials.py
@@ -127,7 +127,7 @@ def itermonomials(variables, max_degrees, min_degrees=None):
for variable in item:
if variable != 1:
powers[variable] += 1
- if max(powers.values()) >= min_degree:
+ if sum(powers.values()) >= min_degree:
monomials_list_comm.append(Mul(*item))
yield from set(monomials_list_comm)
else:
@@ -139,7 +139,7 @@ def itermonomials(variables, max_degrees, min_degrees=None):
for variable in item:
if variable != 1:
powers[variable] += 1
- if max(powers.values()) >= min_degree:
+ if sum(powers.values()) >= min_degree:
monomials_list_non_comm.append(Mul(*item))
yield from set(monomials_list_non_comm)
else: