We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1724f80 commit d0ed558Copy full SHA for d0ed558
src/itensor.jl
@@ -2025,8 +2025,16 @@ end
2025
# TODO: make a specialized printing from Diag
2026
# that emphasizes the missing elements
2027
function show(io::IO, T::ITensor)
2028
- println(io, "ITensor ord=$(order(T))")
2029
- return show(io, MIME"text/plain"(), tensor(T))
+ if get(io, :compact, false)
+ # Just show the indices in compact view, used in some
2030
+ # cases when printing arrays of ITensors (similar to
2031
+ # printing of MPS in ITensorMPS.jl).
2032
+ show(io, inds(T))
2033
+ else
2034
+ println(io, "ITensor ord=$(order(T))")
2035
+ show(io, MIME"text/plain"(), tensor(T))
2036
+ end
2037
+ return nothing
2038
end
2039
2040
function show(io::IO, mime::MIME"text/plain", T::ITensor)
0 commit comments