Skip to content

Commit

Permalink
DimTable now preserves name of AbstractDimArray if present.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBillson committed Sep 10, 2023
1 parent c70b3bb commit 8721b46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ function DimTable(x::AbstractDimArray; layersfrom=nothing, mergedims=nothing)
layernames = Symbol.(["$(dim2key(layersfrom))_$i" for i in 1:nlayers])
return DimTable(layers..., layernames=layernames, mergedims=mergedims)
else
return DimTable(DimStack((;value=x)), mergedims=mergedims)
s = name(x) == NoName() ? DimStack((;value=x)) : DimStack(x)
return DimTable(s, mergedims=mergedims)
end
end

Expand Down

0 comments on commit 8721b46

Please sign in to comment.