Skip to content

Commit 9dedd13

Browse files
committed
fixes
1 parent 728edb1 commit 9dedd13

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/LinearMaps.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ julia> C
223223
730.0 740.0
224224
```
225225
"""
226-
function mul!(y::AbstractVecOrMat, A::LinearMap, x::AbstractVector, α, β)
226+
function mul!(y::AbstractVecOrMat, A::LinearMap, x::AbstractVector, α::Number, β::Number)
227227
check_dim_mul(y, A, x)
228228
return _unsafe_mul!(y, A, x, α, β)
229229
end
230-
function mul!(Y::AbstractMatrix, A::LinearMap, X::AbstractMatrix, α, β)
230+
function mul!(Y::AbstractMatrix, A::LinearMap, X::AbstractMatrix, α::Number, β::Number)
231231
check_dim_mul(Y, A, X)
232232
return _unsafe_mul!(Y, A, X, α, β)
233233
end

src/fillmap.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Base.size(A::FillMap) = A.size
2121
MulStyle(A::FillMap) = FiveArg()
2222
LinearAlgebra.issymmetric(A::FillMap) = A.size[1] == A.size[2]
2323
LinearAlgebra.ishermitian(A::FillMap) = isreal(A.λ) && A.size[1] == A.size[2]
24-
LinearAlgebra.isposdef(A::FillMap) = (LinearAlgebra.checksquare(A) == 1 && isposdef(A.λ))
24+
LinearAlgebra.isposdef(A::FillMap) = (size(A, 1) == size(A, 2) == 1 && isposdef(A.λ))
2525
Base.:(==)(A::FillMap, B::FillMap) = A.λ == B.λ && A.size == B.size
2626

2727
LinearAlgebra.adjoint(A::FillMap) = FillMap(adjoint(A.λ), reverse(A.size))

test/fillmap.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ using LinearMaps, LinearAlgebra, Test
1616
@test size(L) == (M, N)
1717
@test adjoint(L) == FillMap(adjoint(λ), (3,2))
1818
@test transpose(L) == FillMap(λ, (3,2))
19+
@test !issymmetric(L)
20+
@test !ishermitian(L)
21+
@test !isposdef(L)
1922
@test Matrix(L) == A == mul!(copy(A), L, 1) == mul!(copy(A), L, 1, true, false)
2023
@test mul!(copy(1A), L, 2, true, true) == 3A
2124
@test L * x A * x

0 commit comments

Comments
 (0)