Skip to content

ComponentArrays introduces ambiguity for Base.dropdims #193

Closed
@marius311

Description

@marius311

ComponentArrays v0.13.8, Julia 1.8.5

julia> dropdims([1;;], dims=(1,2))
0-dimensional Array{Int64, 0}:
1

julia> using ComponentArrays

julia> dropdims([1;;], dims=(1,2))
ERROR: MethodError: reshape(::Matrix{Int64}, ::Tuple{}) is ambiguous. Candidates:
  reshape(A::AbstractArray, axs::Tuple{Vararg{var"#s15", N}} where var"#s15"<:ComponentArrays.CombinedAxis) where N in ComponentArrays at /global/u1/m/marius/.julia/packages/ComponentArrays/NM9IH/src/array_interface.jl:13
  reshape(a::Array{T, M}, dims::Tuple{Vararg{Int64, N}}) where {T, N, M} in Base at reshapedarray.jl:40
  reshape(parent::AbstractArray, dims::Tuple{Vararg{Int64, N}} where N) in Base at reshapedarray.jl:112
  reshape(parent::AbstractArray, dims::Tuple{Vararg{Union{Colon, Int64}}}) in Base at reshapedarray.jl:119
Possible fix, define
  reshape(::Array{T, M}, ::Tuple{}) where {T, M}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions