@@ -566,42 +566,19 @@ end
566566
567567# Show
568568# ------
569- function Base . summary(io :: IO , t :: TensorMap )
570- return print(io, " TensorMap( " , space(t), " ) " )
569+ function type_repr( :: Type{TensorMap{T, S, N₁, N₂, A}} ) where {T, S, N₁, N₂, A}
570+ return " TensorMap{ $T , $(type_repr(S)) , $N₁ , $N₂ , $A } "
571571end
572- Base. show(io:: IO , t:: TensorMap ) = summary(io, t)
573572
574- function Base. show(io:: IO , :: MIME"text/plain" , t:: TensorMap )
575- if get(io, :compact, false )
576- print(io, " TensorMap(" , space(t), " )" )
577- return
578- end
579- println(io, " TensorMap(" , space(t), " ):" )
580-
581- for (c, b) in blocks(t)
582- print(io, " * block for charge " , c, " :" )
583- summary(io, b)
584- println(io)
585- end
586- # if sectortype(t) == Trivial
587- # Base.print_array(io, t[])
588- # println(io)
589- # elseif FusionStyle(sectortype(t)) isa UniqueFusion
590- # for (f₁, f₂) in fusiontrees(t)
591- # println(io, "* Data for sector ", f₁.uncoupled, " ← ", f₂.uncoupled, ":")
592- # Base.print_array(io, t[f₁, f₂])
593- # println(io)
594- # end
595- # else
596- # for (f₁, f₂) in fusiontrees(t)
597- # println(io, "* Data for fusiontree ", f₁, " ← ", f₂, ":")
598- # Base.print_array(io, t[f₁, f₂])
599- # println(io)
600- # end
601- # end
573+ function Base. showarg(io:: IO , t:: TensorMap , toplevel:: Bool )
574+ ! toplevel && print(io, " ::" )
575+ print(io, type_repr(typeof(t)))
602576 return nothing
603577end
604578
579+ Base. show(io:: IO , t:: TensorMap ) =
580+ print(io, type_repr(typeof(t)), " (" , t. data, " , " , space(t), " )" )
581+
605582# Complex, real and imaginary parts
606583# -----------------------------------
607584for f in (:real, :imag, :complex)
0 commit comments