Skip to content

Commit 65931d0

Browse files
committed
add show method
1 parent a426162 commit 65931d0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/show.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ end
3939
function _show(io::IO, A::ScaledMap{T}, i) where {T}
4040
" with scale: $(A.λ) of\n" * map_show(io, A.lmap, i+2)
4141
end
42+
function _show(io::IO, A::FillMap{T}) where {T}
43+
println(io, " with fill value: $(A.λ)")
44+
end
4245

4346
# helper functions
4447
function _show_typeof(A::LinearMap{T}) where {T}

test/fillmap.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ using LinearMaps, LinearAlgebra, Test
66
for λ in (true, false, 3, μ, μ + 2im)
77
L = LinearMap(λ, (M, N))
88
@test L == LinearMap(λ, M, N)
9+
@test occursin("$M×$N LinearMaps.FillMap{$(typeof(λ))}", sprint((t, s) -> show(t, "text/plain", s), L))
910
@test LinearMaps.MulStyle(L) === LinearMaps.FiveArg()
1011
A = fill(λ, (M, N))
1112
x = rand(typeof(λ) <: Real ? Float64 : ComplexF64, 3)

0 commit comments

Comments
 (0)