From 8721b4614dfb5f3edc9be3ecad25beb94434255b Mon Sep 17 00:00:00 2001 From: JoshuaBillson Date: Sun, 10 Sep 2023 01:41:33 -0600 Subject: [PATCH] DimTable now preserves name of AbstractDimArray if present. --- src/tables.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tables.jl b/src/tables.jl index 341563241..f1ec4a6dd 100644 --- a/src/tables.jl +++ b/src/tables.jl @@ -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