Skip to content

Commit 366f928

Browse files
committed
add 2 arg show to supress excessive network prints
1 parent cee31b5 commit 366f928

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/show.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# AbstractTrees.TreeCharSet("├", "└","┌" "│", "─", "⋮", " ⇒ ")
22

3+
# overload to reduce excessive printing
4+
function Base.show(io::IO, @nospecialize(nw::Network))
5+
print(io, "Network($(nv(nw.im.g)) vertices, $(ne(nw.im.g)) edges")
6+
end
7+
38
function Base.show(io::IO, ::MIME"text/plain", @nospecialize(nw::Network))
49
compact = get(io, :compact, false)::Bool
510
if compact

0 commit comments

Comments
 (0)