Skip to content

Commit

Permalink
Removed Dead Code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBillson committed Sep 9, 2023
1 parent af9381a commit d90b86a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/DimensionalData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export AbstractDimArray, DimArray

export AbstractDimStack, DimStack

export AbstractDimTable, DimTable
export AbstractDimTable, DimTable, WideDimTable

export DimIndices, DimKeys, DimPoints

Expand Down
9 changes: 1 addition & 8 deletions src/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ function WideDimTable(xs::Vararg{AbstractDimArray}; layernames=[Symbol("layer_$i
end

function WideDimTable(x::AbstractDimArray; layersfrom=nothing, mergedims=false)
if (layersfrom <: Dimension) && (any(isa.(dims(x), layersfrom)))
if !isnothing(layersfrom) && (layersfrom <: Dimension) && (any(isa.(dims(x), layersfrom)))
nlayers = size(x, layersfrom)
layers = [(@view x[layersfrom(i)]) for i in 1:nlayers]
layernames = Symbol.(["$(dim2key(layersfrom))_$i" for i in 1:nlayers])
Expand Down Expand Up @@ -375,13 +375,6 @@ end
else
return dimarraycolumns(t)[i - 1]
end
n_dimcols = length(dimcolumns(t))
i = findfirst(==(key), keys)
if i <= n_dimcols
return dimcolumns(t)[i]
else
return dimarraycolumns(t)[i - n_dimcols]
end
end

@inline function Tables.getcolumn(t::WideDimTable, ::Type{T}, i::Int, key::Symbol) where T
Expand Down

0 comments on commit d90b86a

Please sign in to comment.