Skip to content

Commit

Permalink
Update for MutableArithmetics v1.4.5 (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Jun 12, 2024
1 parent e1ea27e commit 903f345
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
MutableArithmetics = "1.4.3"
MutableArithmetics = "1.4.5"
SparseArrays = "1"
julia = "1.6"
4 changes: 0 additions & 4 deletions src/coefficients.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ function LinearAlgebra.dot(ac::AbstractCoefficients, w::AbstractVector)
end
end

# general mutable API
# why here?
MA.operate!(::typeof(zero), v::SparseVector) = (v .= 0; v)

Base.zero(X::AbstractCoefficients) = MA.operate!(zero, similar(X))
Base.:-(X::AbstractCoefficients) = MA.operate_to!(__prealloc(X, -1, *), -, X)
Base.:*(a::Number, X::AbstractCoefficients) = X * a
Expand Down
2 changes: 1 addition & 1 deletion test/group_algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@

@test P2 * P3 == P3 * P2 == P

@test_broken -RG(h) == (-1) * RG(h)
@test -RG(h) == (-1) * RG(h)
@test !iszero(RG(1) - RG(h))

P2m = (RG(1) - RG(h)) // 2
Expand Down

0 comments on commit 903f345

Please sign in to comment.