Skip to content

Method ambiguities reported by Aqua #238

@prbzrg

Description

@prbzrg

In Julia v1.10, I used Aqua to detect method ambiguities in my package impICNF/ContinuousNormalizingFlows.jl#356 and some of its report were related to this package:

Ambiguity #67
copyto!(dest::AbstractArray, src::ComponentArrays.ComponentArray) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/similar_convert_copy.jl:36
copyto!(dest::PermutedDimsArray{T, N}, src::AbstractArray{T, N}) where {T, N} @ Base.PermutedDimsArrays permuteddimsarray.jl:230

Possible fix, define
  copyto!(::PermutedDimsArray{T, N}, ::ComponentArrays.ComponentArray{T, N, A} where A<:AbstractArray{T, N}) where {T, N}

Ambiguity #70
copyto!(dest::AbstractArray, src::ComponentArrays.ComponentArray) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/similar_convert_copy.jl:36
copyto!(dest::PermutedDimsArray, src::AbstractArray) @ Base.PermutedDimsArrays permuteddimsarray.jl:234

Possible fix, define
  copyto!(::PermutedDimsArray, ::ComponentArrays.ComponentArray)

Ambiguity #78
getindex(ax::ComponentArrays.CombinedAxis, i::AbstractArray) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/axis.jl:202
getindex(r::AbstractUnitRange, s::AbstractUnitRange{T}) where T<:Integer @ Base range.jl:986

Possible fix, define
  getindex(::ComponentArrays.CombinedAxis, ::AbstractUnitRange{T}) where T<:Integer

Ambiguity #79
getindex(ax::ComponentArrays.CombinedAxis, i::AbstractArray) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/axis.jl:202
getindex(r::AbstractUnitRange, s::StepRange{T}) where T<:Integer @ Base range.jl:1007

Possible fix, define
  getindex(::ComponentArrays.CombinedAxis, ::StepRange{T}) where T<:Integer

Ambiguity #89
maybeview(x::ComponentArrays.ComponentArray, idx...) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:116
maybeview(A::AbstractArray, args::Union{Number, Base.AbstractCartesianIndex}...) @ Base views.jl:149

Possible fix, define
  maybeview(::ComponentArrays.ComponentArray, ::Vararg{Union{Number, Base.AbstractCartesianIndex}})

Ambiguity #106
stride(x::ComponentArrays.ComponentArray, k) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:147
stride(A::AbstractArray, k::Integer) @ Base abstractarray.jl:591

Possible fix, define
  stride(::ComponentArrays.ComponentArray, ::Integer)

Ambiguity #107
stride(x::ComponentArrays.ComponentArray, k) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:147
stride(A::Union{Base.ReinterpretArray{T, N, S, A, IsReshaped} where {T, N, A<:Union{SubArray{T, N, A, I, true} where {T, N, A<:DenseArray, I<:Union{Tuple{Vararg{Real}}, Tuple{AbstractUnitRange, Vararg{Any}}}}, DenseArray}, IsReshaped, S}, Base.ReshapedArray{T, N, A} where {T, N, A<:Union{Base.ReinterpretArray{T, N, S, A, IsReshaped} where {T, N, A<:Union{SubArray{T, N, A, I, true} where {T, N, A<:DenseArray, I<:Union{Tuple{Vararg{Real}}, Tuple{AbstractUnitRange, Vararg{Any}}}}, DenseArray}, IsReshaped, S}, SubArray{T, N, A, I, true} where {T, N, A<:DenseArray, I<:Union{Tuple{Vararg{Real}}, Tuple{AbstractUnitRange, Vararg{Any}}}}, DenseArray}}, DenseArray}, k::Integer) @ Base reinterpretarray.jl:174

Possible fix, define
  stride(::ComponentArrays.ComponentArray, ::Integer)

Ambiguity #109
to_indices(x::ComponentArrays.ComponentArray, i::Tuple{Vararg{Union{Integer, CartesianIndex}, N}}) where N @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:88
to_indices(A, I::Tuple{}) @ Base indices.jl:348

Possible fix, define
  to_indices(::ComponentArrays.ComponentArray, ::Tuple{})

Ambiguity #110
to_indices(x::ComponentArrays.ComponentArray, i::Tuple{Any}) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:87
to_indices(A, I::Tuple{Vararg{Integer}}) @ Base indices.jl:350

Possible fix, define
  to_indices(::ComponentArrays.ComponentArray, ::Tuple{Integer})

Ambiguity #111
to_indices(x::ComponentArrays.ComponentArray, i::Tuple{Vararg{Union{Integer, CartesianIndex}, N}}) where N @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:88
to_indices(A, I::Tuple{Vararg{Integer}}) @ Base indices.jl:350

Possible fix, define
  to_indices(::ComponentArrays.ComponentArray, ::Tuple{Vararg{Integer, N}}) where N

Ambiguity #112
to_indices(x::ComponentArrays.ComponentArray, i::Tuple{Vararg{Int64, N}}) where N @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:89
to_indices(A, I::Tuple{}) @ Base indices.jl:348

Possible fix, define
  to_indices(::ComponentArrays.ComponentArray, ::Tuple{})

Ambiguity #115
vcat(x::ComponentArrays.ComponentVector, args...) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:61
vcat(A::Union{Number, AbstractArray}...) @ Base abstractarray.jl:1999

Possible fix, define
  vcat(::ComponentArrays.ComponentVector, ::Vararg{Union{Number, AbstractArray}})

Ambiguity #116
vcat(x::ComponentArrays.ComponentVector, args...) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:61
vcat(A::AbstractArray, B::AbstractArray) @ Base abstractarray.jl:1997

Possible fix, define
  vcat(::ComponentArrays.ComponentVector, ::AbstractArray)

Ambiguity #117
vcat(x::ComponentArrays.ComponentVector, args...) @ ComponentArrays ~/.julia/packages/ComponentArrays/xmKpc/src/array_interface.jl:61
vcat(A::AbstractArray...) @ Base abstractarray.jl:1998

Possible fix, define
  vcat(::ComponentArrays.ComponentVector, ::Vararg{AbstractArray})

I would appreciate your attention to this issue.

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