Skip to content

Commit d8ff05c

Browse files
author
Andy Ferris
committed
Fix some tests, remove show for MArray
1 parent 8fb71bf commit d8ff05c

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/MArray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ end
7474
@inline MArray(a::StaticArray) = MArray{size_tuple(Size(a))}(Tuple(a))
7575

7676
# Simplified show for the type
77-
show(io::IO, ::Type{MArray{S, T, N}}) where {S, T, N} = print(io, "MArray{$S,$T,$N}")
77+
#show(io::IO, ::Type{MArray{S, T, N}}) where {S, T, N} = print(io, "MArray{$S,$T,$N}")
7878

7979
# Some more advanced constructor-like functions
8080
@inline one(::Type{MArray{S}}) where {S} = one(MArray{S,Float64,tuple_length(S)})

src/MMatrix.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ end
5757
@inline MMatrix(a::StaticMatrix) = MMatrix{size(typeof(a),1),size(typeof(a),2)}(Tuple(a))
5858

5959
# Simplified show for the type
60-
show(io::IO, ::Type{MMatrix{N, M, T}}) where {N, M, T} = print(io, "MMatrix{$N,$M,$T}")
60+
#show(io::IO, ::Type{MMatrix{N, M, T}}) where {N, M, T} = print(io, "MMatrix{$N,$M,$T}")
6161

6262
# Some more advanced constructor-like functions
6363
@inline one(::Type{MMatrix{N}}) where {N} = one(MMatrix{N,N})

src/MVector.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const MVector{S, T} = MArray{Tuple{S}, T, 1, S}
2121
@inline MVector{S}(x::NTuple{S,Any}) where {S} = MVector{S, promote_tuple_eltype(typeof(x))}(x)
2222

2323
# Simplified show for the type
24-
show(io::IO, ::Type{MVector{N, T}}) where {N, T} = print(io, "MVector{$N,$T}")
24+
#show(io::IO, ::Type{MVector{N, T}}) where {N, T} = print(io, "MVector{$N,$T}")
2525

2626
# Some more advanced constructor-like functions
2727
@inline zeros(::Type{MVector{N}}) where {N} = zeros(MVector{N,Float64})

src/SDiagonal.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ else
9494
log(D::SDiagonal) = SDiagonal(log.(D.diag))
9595
sqrt(D::SDiagonal) = SDiagonal(sqrt.(D.diag))
9696
end
97-
Base.chol(D::SDiagonal) = SDiagonal(Base.chol.(D.diag))
97+
LinearAlgebra.chol(D::SDiagonal) = SDiagonal(Base.chol.(D.diag))
9898
LinearAlgebra._chol!(D::SDiagonal, ::Type{UpperTriangular}) = chol(D)
9999

100100
\(D::SDiagonal, B::StaticMatrix) = scalem(1 ./ D.diag, B)

test/det.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@test logdet(@SMatrix [1]) == 0.0
44
@test det(@SMatrix [0 1; 1 0]) == -1
55
@test logdet(@SMatrix Complex{Float64}[0 1; 1 0]) == log(det(@SMatrix Complex{Float64}[0 1; 1 0]))
6-
@test det(one(SMatrix{3,3})*im) == det(one(3,3)*im)
6+
@test det(one(SMatrix{3,3})*im) == det([1.0*im 0.0 0.0; 0.0 1.0*im 0.0; 0.0 0.0 1.0*im])
77

88
@test det(@SMatrix [0 1 0; 1 0 0; 0 0 1]) == -1
99
m = [0.570085 0.667147 0.264427 0.561446

test/lyap.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@testset "Lyapunov equation" begin
22
@test lyap(@SMatrix([1]), @SMatrix [2]) === @SMatrix [-1.0]
33

4-
@test lyap(@SMatrix([1 1; 0 1]), @SMatrix [2 1; 1 2]) == [-2 0; 0 -2]
4+
@test lyap(@SMatrix([1 1; 0 1]), @SMatrix [2 1; 1 2]) == [-1 0; 0 -1]
55
@test isa(lyap(@SMatrix([1 1; 0 1]), @SMatrix [2 1; 1 2]), SArray{Tuple{2,2},Float64,2,4})
66

77
@test lyap(@SMatrix([1 0 1; 0 1 0; 0 0 1]), @SMatrix [2 4 4; 0 4 20; 0 0 20]) == [-5.0 -2.0 3.0; 5.0 -2.0 -10.0; 5.0 0.0 -10.0]

0 commit comments

Comments
 (0)