File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -645,18 +645,24 @@ end
645645
646646# Human-readable:
647647function Base. show (io:: IO , :: MIME"text/plain" , t:: AbstractTensorMap )
648- # 1) show summary: typically d₁×d₂×… ← d₃×d₄×… $(typeof(t)):
648+ # 1) show summary: typically d₁×d₂×… ← d₃×d₄×… $(typeof(t))
649649 summary (io, t)
650- println (io, " :" )
651650
651+ # case without `\n`:
652+ if get (io, :compact , true )
653+ print (io, " (…, " )
654+ show (io, mime, space (t))
655+ print (io, ' )' )
656+ return nothing
657+ end
658+
659+ # case with `\n`
652660 # 2) show spaces
653- # println(io, " space(t):" )
661+ println (io, ' : ' )
654662 println (io, " codomain: " , codomain (t))
655663 println (io, " domain: " , domain (t))
656664
657665 # 3) [optional]: show data
658- get (io, :compact , true ) && return nothing
659- ioc = IOContext (io, :typeinfo => sectortype (t))
660666 println (io, " \n\n blocks: " )
661667 show_blocks (io, MIME " text/plain" (), blocks (t))
662668 return nothing
You can’t perform that action at this time.
0 commit comments