Skip to content

Commit

Permalink
Cleanup of duplicate methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexatos committed Aug 9, 2021
1 parent b0f8cd4 commit 3e2d9b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/CircularArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ Base.parent(arr::CircularArray) = arr.data
end

@inline _similar(arr::CircularArray, ::Type{T}, dims) where T = CircularArray(similar(parent(arr), T, dims))
@inline Base.similar(arr::CircularArray, ::Type{T}, dims::Dims) where T = _similar(arr, T, dims)
@inline Base.similar(arr::CircularArray, ::Type{T}, dims::Tuple{Base.DimOrInd, Vararg{Base.DimOrInd}}) where T = _similar(arr, T, dims)
# Ambiguity resolution with Base
@inline Base.similar(arr::CircularArray, ::Type{T}, dims::Tuple{Int64, Vararg{Int64}}) where T = _similar(arr, T, dims)
@inline Base.similar(arr::CircularArray, ::Type{T}, dims::Dims) where T = _similar(arr, T, dims)
@inline Base.similar(arr::CircularArray, ::Type{T}, dims::Tuple{Union{Integer, Base.OneTo}, Vararg{Union{Integer, Base.OneTo}}}) where T = _similar(arr, T, dims)

function Base.showarg(io::IO, arr::CircularArray, toplevel)
Expand Down

0 comments on commit 3e2d9b3

Please sign in to comment.