Skip to content

Commit 74f006b

Browse files
committed
update blockshow
1 parent fef507d commit 74f006b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/tensors/blockiterator.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,17 @@ function show_blocks(io, iter)
6262
print(io, ")")
6363
return nothing
6464
end
65+
66+
function Base.summary(io::IO, b::BlockIterator)
67+
print(io, "blocks(")
68+
Base.showarg(io, b.t, false)
69+
print(io, ")")
70+
return nothing
71+
end
72+
73+
function Base.show(io::IO, mime::MIME"text/plain", b::BlockIterator)
74+
summary(io, b)
75+
println(io, ":")
76+
show_blocks(io, mime, b)
77+
return nothing
78+
end

0 commit comments

Comments
 (0)