Skip to content

Commit c8979ed

Browse files
committed
Fix ambiguity error
1 parent 13a3198 commit c8979ed

File tree

1 file changed

+6
-0
lines changed
  • NDTensors/src/lib/SparseArrayInterface/src/sparsearrayinterface

1 file changed

+6
-0
lines changed

NDTensors/src/lib/SparseArrayInterface/src/sparsearrayinterface/indexing.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ function sparse_setindex!(a::AbstractArray, value, I::Vararg{Int})
137137
return a
138138
end
139139

140+
# Fix ambiguity error
141+
function sparse_setindex!(a::AbstractArray, value)
142+
sparse_setindex!(a, value, CartesianIndex())
143+
return a
144+
end
145+
140146
# Linear indexing
141147
function sparse_setindex!(a::AbstractArray, value, I::CartesianIndex{1})
142148
sparse_setindex!(a, value, CartesianIndices(a)[I])

0 commit comments

Comments
 (0)