-
-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
ComponentArray(a=Int[]) #fails
ComponentArray(a=Int[],b=[4,5]) #worksIn my code, a can or cannot contain values. But in both cases, I would like to be able to use the same code by allowing empty componentarrays.
This line in the code prevents empty componentarrays. (reduce isn't allowed for empty arrays).
This is easily fixed by changing that line to
if length(data) == 1
data = [data[1]]
elseif length(data) > 1
data = reduce(vcat, data)
endNote: type info for the array a is needed, or another error is thrown.
Metadata
Metadata
Assignees
Labels
No labels