Skip to content

Commit

Permalink
[Containers] remove unneeded prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Dec 11, 2023
1 parent c151994 commit d81bf62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/Containers/DenseAxisArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,7 @@ struct DenseAxisArrayView{T,N,D,A} <: AbstractArray{T,N}
end
end

function Base.view(A::Containers.DenseAxisArray, args...)
return DenseAxisArrayView(A, args...)
end
Base.view(A::DenseAxisArray, args...) = DenseAxisArrayView(A, args...)

Base.size(x::DenseAxisArrayView) = length.(axes(x))

Expand Down
8 changes: 4 additions & 4 deletions src/Containers/macro.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function build_ref_sets(error_fn::Function, expr)
end
if !_has_dependent_sets(index_vars, index_sets) && condition == :()
# Convert any 1:N to Base.OneTo(N)
new_index_sets = Containers._explicit_oneto.(index_sets)
new_index_sets = _explicit_oneto.(index_sets)
indices = :(Containers.vectorized_product($(new_index_sets...)))
return index_vars, indices
end
Expand Down Expand Up @@ -309,11 +309,11 @@ function container_code(
# This switch handles the four "built-in" JuMP container types, with a
# generic fallback for user-defined types.
container_type = if requested_container == :Auto
Containers.AutoContainerType
AutoContainerType
elseif requested_container == :DenseAxisArray
Containers.DenseAxisArray
DenseAxisArray
elseif requested_container == :SparseAxisArray
Containers.SparseAxisArray
SparseAxisArray
elseif requested_container == :Array
Array
else
Expand Down
2 changes: 1 addition & 1 deletion src/Containers/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function rowtable(
"Invalid number of column names provided: Got $got, expected $want.",
)
end
elements = [(args..., f(x[i])) for (i, args) in Containers._rows(x)]
elements = [(args..., f(x[i])) for (i, args) in _rows(x)]
return NamedTuple{tuple(header...)}.(elements)
end

Expand Down

0 comments on commit d81bf62

Please sign in to comment.