Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Nov 3, 2024
1 parent 06c2d82 commit d95b8a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,14 @@ function DimTable(s::AbstractDimStack;
end
function DimTable(As::Vararg{AbstractDimArray};
layernames=nothing,
name=layernames,
mergedims=nothing,
)
# Check that dims are compatible
comparedims(As...)
# Construct Layer Names
layernames = isnothing(layernames) ? uniquekeys(As) : layernames
# Construct dimension and array columns with DimExtensionArray
As = isnothing(mergedims) ? As : map(x -> DimensionalData.mergedims(x, mergedims), As)
As = isnothing(mergedims) ? As : map(x -> DD.mergedims(x, mergedims), As)
dims_ = dims(first(As))
dimcolumns = collect(_dimcolumns(dims_))
dimnames = collect(map(name, dims_))
Expand Down
7 changes: 6 additions & 1 deletion test/tables.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using DimensionalData, IteratorInterfaceExtensions, TableTraits, Tables, Test, DataFrames
using DimensionalData
using Test
using Tables
using IteratorInterfaceExtensions
using TableTraits
using DataFrames

using DimensionalData.Lookups, DimensionalData.Dimensions
using DimensionalData: DimTable, DimExtensionArray
Expand Down

0 comments on commit d95b8a8

Please sign in to comment.