Skip to content

Commit 8742a2a

Browse files
committed
Fixes
1 parent b240299 commit 8742a2a

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function MP.monomials(vars::Tuple{Vararg{Variable}}, degrees::AbstractArray, fil
8686
# Otherwise, the following error is thrown: "ArgumentError: argument to Flatten must contain at least one iterator"
8787
return Monomial{vars, length(vars)}[]
8888
end
89-
d = sort(degrees)
89+
degs = sort(degrees)
9090
it = Iterators.Filter(MP.ExponentsIterator{MP.Graded{MP.LexOrder}}(
9191
zeros(Int, length(vars));
9292
mindegree = minimum(degrees),

test/generators.jl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
@testset "monomial generation" begin
22
@polyvar x y z
33

4-
@test TypedPolynomials.monomial_powers(Val{3}(), 3) == reverse([
5-
(3, 0, 0),
6-
(2, 1, 0),
7-
(2, 0, 1),
8-
(1, 2, 0),
9-
(1, 1, 1),
10-
(1, 0, 2),
11-
(0, 3, 0),
12-
(0, 2, 1),
13-
(0, 1, 2),
14-
(0, 0, 3),
15-
])
164
@test @inferred(monomials((x, y), 2)) == reverse([x^2, x * y, y^2])
175
@test @inferred(monomials((x, y), 0:2)) == reverse([x^2, x * y, y^2, x, y, 1])
186
@test @inferred(monomials((x, y), [1, 0, 2])) == reverse([x^2, x * y, y^2, x, y, 1])

0 commit comments

Comments
 (0)