Skip to content

Commit

Permalink
Fix ambiguity error
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Nov 13, 2024
1 parent 13a3198 commit c8979ed
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ function sparse_setindex!(a::AbstractArray, value, I::Vararg{Int})
return a
end

# Fix ambiguity error
function sparse_setindex!(a::AbstractArray, value)
sparse_setindex!(a, value, CartesianIndex())
return a
end

# Linear indexing
function sparse_setindex!(a::AbstractArray, value, I::CartesianIndex{1})
sparse_setindex!(a, value, CartesianIndices(a)[I])
Expand Down

0 comments on commit c8979ed

Please sign in to comment.