Skip to content

Commit

Permalink
fix ambiguity on Julia1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Jan 5, 2024
1 parent 9ad2804 commit 0c86fe1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/spaces/cartesianspace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Base.:^(::RealNumbers, d::Int) = CartesianSpace(d)

# Corresponding methods:
#------------------------
dim(V::CartesianSpace) = V.d
dim(V::CartesianSpace, s::Trivial = Trivial()) = V.d
Base.axes(V::CartesianSpace) = Base.OneTo(dim(V))

Base.oneunit(::Type{CartesianSpace}) = CartesianSpace(1)
Expand Down
2 changes: 1 addition & 1 deletion src/spaces/complexspace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Base.:^(::ComplexNumbers, d::Int) = ComplexSpace(d)

# Corresponding methods:
#------------------------
dim(V::ComplexSpace) = V.d
dim(V::ComplexSpace, s::Trivial = Trivial()) = V.d
isdual(V::ComplexSpace) = V.dual
Base.axes(V::ComplexSpace) = Base.OneTo(dim(V))

Expand Down
2 changes: 1 addition & 1 deletion src/spaces/generalspace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function GeneralSpace{𝕜}(d::Int=0; dual::Bool=false, conj::Bool=false) where
return GeneralSpace{𝕜}(d, dual, conj)
end

dim(V::GeneralSpace) = V.d
dim(V::GeneralSpace, s::Trivial = Trivial()) = V.d
isdual(V::GeneralSpace) = V.dual
isconj(V::GeneralSpace) = V.conj

Expand Down
3 changes: 0 additions & 3 deletions src/spaces/vectorspaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,6 @@ Base.axes(V::ElementarySpace, ::Trivial) = axes(V)
Return an iterator over the different sectors of `V`.
"""
sectors(V::ElementarySpace) = OneOrNoneIterator(dim(V) != 0, Trivial())
function dim(V::ElementarySpace, ::Trivial)
return sectortype(V) == Trivial ? dim(V) : throw(SectorMismatch())
end

# Composite vector spaces
#-------------------------
Expand Down

0 comments on commit 0c86fe1

Please sign in to comment.