We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems that the TODO mentioned in
https://github.com/JuliaLang/julia/blob/master/stdlib/SparseArrays/src/sparsematrix.jl#L2701
causes an error reported in https://stackoverflow.com/questions/55326817/mapping-a-function-to-an-array-of-sparse-matrices-in-julia.
This issue is similar to JuliaLang/julia#29034 but seems to be a separate case (not 100% sure, as I do not know this part of sources very well).
A MWE is something like:
julia> mapslices(x -> "a", sprand(3, 3, 0.5), dims=2) ERROR: MethodError: no method matching zero(::Type{String})
The text was updated successfully, but these errors were encountered:
Are you sure this is about https://github.com/JuliaLang/julia/blob/master/stdlib/SparseArrays/src/sparsematrix.jl#L2701? Isnøt the issue just that SparseMatrixCSC doesn't really work for element types without a zero defined.
SparseMatrixCSC
Sorry, something went wrong.
I think I am sure (i.e. the bug is that we try to create a sparse matrix while we should create a dense matrix and there would be no problem).
Here is another example that should in theory produce the same result, but one fails because zero is not defined for the processed type (as you note):
zero
julia> mapslices(findmax, sprand(3,3,0.5), dims=2) ERROR: MethodError: no method matching zero(::Type{Tuple{Float64,Int64}}) julia> findmax(sprand(3,3,0.5), dims=2) ( [1, 1] = 0.467715 [2, 1] = 0.0989516 [3, 1] = 0.593281, CartesianIndex{2}[CartesianIndex(1, 2); CartesianIndex(2, 2); CartesianIndex(3, 3)])
But as I have said above - I did not dig too deeply into the source code.
No branches or pull requests
It seems that the TODO mentioned in
https://github.com/JuliaLang/julia/blob/master/stdlib/SparseArrays/src/sparsematrix.jl#L2701
causes an error reported in https://stackoverflow.com/questions/55326817/mapping-a-function-to-an-array-of-sparse-matrices-in-julia.
This issue is similar to JuliaLang/julia#29034 but seems to be a separate case (not 100% sure, as I do not know this part of sources very well).
A MWE is something like:
The text was updated successfully, but these errors were encountered: