-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stdlib/SparseArrays: fix scalar setindex! for vector eltype #29331
Conversation
Appveyor failure seems unrelated |
Can we merge this? |
dc79628
to
c59c398
Compare
Just rebased the branch: to me the appveyor failure does not seem to be related |
@@ -2565,7 +2569,8 @@ end | |||
_to_same_csc(::SparseMatrixCSC{Tv, Ti}, V::AbstractMatrix, I...) where {Tv,Ti} = convert(SparseMatrixCSC{Tv,Ti}, V) | |||
_to_same_csc(::SparseMatrixCSC{Tv, Ti}, V::AbstractVector, I...) where {Tv,Ti} = convert(SparseMatrixCSC{Tv,Ti}, reshape(V, map(length, I))) | |||
|
|||
setindex!(A::SparseMatrixCSC{Tv}, B::AbstractVecOrMat, I::Integer, J::Integer) where {Tv} = setindex!(A, convert(Tv, B), I, J) | |||
setindex!(A::SparseMatrixCSC{Tv}, B::AbstractVecOrMat, I::Integer, J::Integer) where {Tv} = _setindex_scalar!(A, B, I, J) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping we might be able to remove this method entirely, but it looks like it's disambiguating against the method that immediately follows. Using a helper function like this is a good solution.
Should this be backported to 1.0 too? The issue is also present in 1.0.3. |
Yes, I'd support backporting it — it's a fairly major bugfix. |
Ping. I run into this, I believe on Julia Version 1.1.0:
|
probably because this pull request has not yet been backported |
fixes #29034
There might be more elegant solutions, I'm open to suggestions.