Skip to content

Commit

Permalink
constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Nov 24, 2023
1 parent 3bf1120 commit 939beb2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Dimensions/dimension.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,15 @@ struct Dim{S,T} <: Dimension{T}
end
new{S,typeof(val)}(val)
end
end
function Dim{S}(val::AbstractArray; kw...) where S
if length(kw) > 0
val = AutoLookup(val, values(kw))
function Dim{S}(val::AbstractArray; kw...) where S
if length(kw) > 0
val = AutoLookup(val, values(kw))
end
Dim{S,typeof(val)}(val)
end
function Dim{S,T}(val::T) where {S,T}
new{S,T}(val)
end
Dim{S,typeof(val)}(val)
end
Dim{S}() where S = Dim{S}(:)

Expand Down

0 comments on commit 939beb2

Please sign in to comment.