Skip to content

Commit 617fc6c

Browse files
committed
another merge fix
1 parent 1ce9609 commit 617fc6c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/spaces/gradedspace.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ Base.hash(V::GradedSpace, h::UInt) = hash(V.dual, hash(V.dims, h))
9292
field(::Type{<:GradedSpace}) =
9393
InnerProductStyle(::Type{<:GradedSpace}) = EuclideanInnerProduct()
9494
function dim(V::GradedSpace)
95-
return reduce(
96-
+, dim(V, c) * dim(c) for c in sectors(V);
97-
init = zero(dim(unit(sectortype(V))))
98-
)
95+
T = Base.promote_op(*, Int, real(sectorscalartype(sectortype(V))))
96+
return reduce(+, dim(V, c) * dim(c) for c in sectors(V);
97+
init=zero(T))
9998
end
10099
function dim(V::GradedSpace{I, <:AbstractDict}, c::I) where {I <: Sector}
101100
return get(V.dims, isdual(V) ? dual(c) : c, 0)

0 commit comments

Comments
 (0)