Skip to content

Commit 5b7e539

Browse files
committed
update show
1 parent 14ce01a commit 5b7e539

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/scaledmap.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ end
1111
ScaledMap::S, lmap::A) where {S<:RealOrComplex,A<:LinearMap} =
1212
ScaledMap{Base.promote_op(*, S, eltype(lmap))}(λ, lmap)
1313

14-
# show
15-
function Base.show(io::IO, A::ScaledMap{T}) where {T}
16-
println(io, "LinearMaps.ScaledMap{$T}, scale = $(A.λ)")
17-
show(io, A.lmap)
18-
end
19-
2014
# basic methods
2115
Base.size(A::ScaledMap) = size(A.lmap)
2216
Base.isreal(A::ScaledMap) = isreal(A.λ) && isreal(A.lmap)

src/show.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ function _show(io::IO, A::Union{AdjointMap,TransposeMap,WrappedMap})
2525
if A isa MatrixMap
2626
# summary(io, L)
2727
# println(io, ":")
28-
Base.print_matrix(io, L)
28+
# Base.print_matrix(io, L)
29+
print(io, typeof(L))
2930
else
30-
_show(io, L)
31+
show(io, L)
3132
end
3233
end
3334
function _show(io::IO, A::BlockMap)
@@ -37,7 +38,6 @@ function _show(io::IO, A::BlockMap)
3738
print_maps(io, A.maps)
3839
end
3940
function _show(io::IO, A::BlockDiagonalMap)
40-
nrows = length(A.rows)
4141
n = length(A.maps)
4242
println(io, " with $n diagonal block map", n>1 ? "s" : "")
4343
print_maps(io, A.maps)
@@ -46,6 +46,10 @@ function _show(io::IO, J::UniformScalingMap)
4646
s = "$(J.λ)"
4747
print(io, " with scaling factor: $s")
4848
end
49+
function _show(io::IO, A::ScaledMap{T}) where {T}
50+
println(io, " with scale: $(A.λ) of")
51+
show(io, A.lmap)
52+
end
4953

5054
# helper functions
5155
function _show_typeof(io::IO, A::LinearMap{T}) where {T}

0 commit comments

Comments
 (0)