Skip to content

Commit

Permalink
Fix some recent matrix methods (#1516)
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma authored Dec 5, 2023
1 parent 9dd2219 commit c7804d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "AbstractAlgebra"
uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
version = "0.34.2"
version = "0.34.3"

[deps]
GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120"
Expand Down
6 changes: 4 additions & 2 deletions src/generic/Matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,19 @@ function matrix_space(R::AbstractAlgebra.NCRing, r::Int, c::Int; cached::Bool =
return MatSpace{T}(R, r, c)
end

function AbstractAlgebra.sub!(A::MatElem{T}, B::MatElem{T}, C::MatElem{T}) where T
function AbstractAlgebra.sub!(A::Mat{T}, B::Mat{T}, C::Mat{T}) where T
A.entries.= B.entries .- C.entries
return A
end

#since type(view(MatElem{T})) != MatElem{T} which breaks
# sub!(A::T, B::T, C::T) where T in AA
function AbstractAlgebra.mul!(A::MatElem{T}, B::MatElem{T}, C::MatElem{T}, f::Bool = false) where T
function AbstractAlgebra.mul!(A::Mat{T}, B::Mat{T}, C::Mat{T}, f::Bool = false) where T
if f
A.entries .+= (B * C).entries
else
A.entries .= (B * C).entries
end
return A
end

2 comments on commit c7804d9

@thofma
Copy link
Member Author

@thofma thofma commented on c7804d9 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/96545

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.34.3 -m "<description of version>" c7804d93e395c9a77fb7c0744116b0da23a6c962
git push origin v0.34.3

Please sign in to comment.