Skip to content

Commit

Permalink
Fix infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Sep 21, 2023
1 parent 93de83d commit aeb3f9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Sparse/Matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ function *(b::T, A::SMat{T}) where T
return B
end

function *(b::Union{NCRingElem,RingElement}, A::SMat{T}) where T
function *(b, A::SMat)
return base_ring(A)(b)*A
end

Expand All @@ -717,7 +717,7 @@ function *(A::SMat{T}, b::T) where T
return B
end

function *(A::SMat{T}, b::Union{NCRingElem,RingElement}) where T
function *(A::SMat, b)
return A*base_ring(A)(b)
end

Expand Down
4 changes: 2 additions & 2 deletions src/Sparse/Row.jl
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ function *(b::T, A::SRow{T}) where T
return B
end

function *(b::Union{NCRingElem,RingElement}, A::SRow{T}) where T
function *(b, A::SRow)
if length(A.values) == 0
return sparse_row(base_ring(A))
end
Expand All @@ -508,7 +508,7 @@ function *(A::SRow{T}, b::T) where T
return B
end

function *(A::SRow{T}, b::Union{NCRingElem,RingElement}) where T
function *(A::SRow, b)
if length(A.values) == 0
return sparse_row(base_ring(A))
end
Expand Down

0 comments on commit aeb3f9b

Please sign in to comment.