Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
projekter committed Nov 30, 2023
2 parents f87fb62 + 4c59103 commit 71ffcb5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DynamicPolynomials"
uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07"
repo = "https://github.com/JuliaAlgebra/DynamicPolynomials.jl.git"
version = "0.5.2"
version = "0.5.3"

[deps]
Future = "9fa8497b-333b-5362-9e8d-4d0656e87820"
Expand Down
2 changes: 1 addition & 1 deletion src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Defining the specific methods solve this problem and also make
# them a lot faster
Base.:(^)(x::Variable{V,M}, i::Int) where {V,M} = Monomial{V,M}([x], [i])
Base.:(^)(x::Monomial{<:Commutative}, i::Int) = Monomial(x.vars, i * x.z)
Base.:(^)(x::Monomial{<:Commutative}, i::Int) = Monomial(copy(x.vars), i * x.z)

myminivect(x::T, y::T) where {T} = [x, y]
function myminivect(x::S, y::T) where {S,T}
Expand Down
8 changes: 8 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ using LinearAlgebra
@test p(x0 => y0, x1 => y1) == y1 * y0 * y1
end

# https://github.com/JuliaAlgebra/DynamicPolynomials.jl/issues/141
@testset "Issue #141" begin
@polyvar x
m = x^2
q = m^2
@test variables(q) !== variables(m)
end

@testset "Issue #79, Issue #80 and Issue #92" begin
@polyvar x[1:2]
p1 = x[1] * 0.0 + x[2] * 0
Expand Down

0 comments on commit 71ffcb5

Please sign in to comment.