Skip to content

Commit 47f50e3

Browse files
committed
add Diagonal support
1 parent d4f3095 commit 47f50e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/testsuite/TestSuite.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module TestSuite
1111
using Test, TestExtras
1212
using MatrixAlgebraKit
1313
using MatrixAlgebraKit: diagview
14-
using LinearAlgebra: norm, istriu
14+
using LinearAlgebra: Diagonal, norm, istriu
1515
using Random, StableRNGs
1616

1717
const tests = Dict()
@@ -33,6 +33,7 @@ seed_rng!(seed) = Random.seed!(rng, seed)
3333

3434
instantiate_matrix(::Type{T}, size) where {T <: Number} = randn(rng, T, size)
3535
instantiate_matrix(::Type{AT}, size) where {AT <: Array} = randn(rng, eltype(AT), size)
36+
instantiate_matrix(::Type{AT}, size) where {AT <: Diagonal} = Diagonal(randn(rng, eltype(AT), size))
3637

3738
precision(::Type{T}) where {T <: Number} = sqrt(eps(real(T)))
3839
precision(::Type{T}) where {T} = precision(eltype(T))

0 commit comments

Comments
 (0)