Skip to content

Commit e348224

Browse files
committed
use reduced dim
1 parent 9f44be3 commit e348224

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/spaces/gradedspace.jl

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,18 @@ function supremum(V₁::GradedSpace{I}, V₂::GradedSpace{I}) where {I <: Sector
197197
)
198198
end
199199

200-
function Base.summary(io::IO, V::GradedSpace)
201-
d = dim(V)
202-
dstr = d isa Int ? string(d) : @sprintf "%.2f" d
203-
print(io, dstr, "-dimensional ")
204-
isdual(V) && print(io, "dual ")
200+
function Base.showarg(io::IO, V::GradedSpace, toplevel::Bool)
201+
isdual(V) && print(io, "dual(")
202+
(!toplevel || isdual(V)) && print(io, "::")
205203
print(io, type_repr(typeof(V)))
204+
isdual(V) && print(io, ")")
205+
return nothing
206+
end
207+
208+
function Base.summary(io::IO, V::GradedSpace)
209+
d = reduceddim(V)
210+
print(io, d, "-element ")
211+
Base.showarg(io, V, true)
206212
return nothing
207213
end
208214

0 commit comments

Comments
 (0)