Skip to content

Commit e382f3f

Browse files
committed
fix typeinfo for sparse-matrix/vector display
1 parent 76e7421 commit e382f3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/SparseArrays/src/sparsematrix.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function Base.show(io::IO, ::MIME"text/plain", S::SparseMatrixCSC)
152152
xnnz == 1 ? "entry" : "entries")
153153
if xnnz != 0
154154
print(io, ":")
155-
show(io, S)
155+
show(IOContext(io, :typeinfo => eltype(S)), S)
156156
end
157157
end
158158

stdlib/SparseArrays/src/sparsevector.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ function show(io::IO, ::MIME"text/plain", x::AbstractSparseVector)
828828
" stored ", xnnz == 1 ? "entry" : "entries")
829829
if xnnz != 0
830830
println(io, ":")
831-
show(io, x)
831+
show(IOContext(io, :typeinfo => eltype(x)), x)
832832
end
833833
end
834834

0 commit comments

Comments
 (0)