You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I got this error while trying to use sparse matrices and vectors with Flux.
julia> a =TrackedArray(sparse([1, 2, 3]))
Tracked 3-element SparseVector{Int64,Int64}:123
julia> a[2]
ERROR: MethodError: no method matching spzeros(::Type{Int64})
Closest candidates are:spzeros(::Type{T}, ::Integer) where T at sparse/sparsevector.jl:47spzeros(::Type{Tv}, ::Integer, ::Integer) where Tv at sparse/sparsematrix.jl:1375spzeros(::Type{Tv}, ::Type{Ti<:Integer}, ::Integer) where {Tv, Ti<:Integer} at sparse/sparsevector.jl:48...
Stacktrace:
[1] getindex(::TrackedArray{…,SparseVector{Int64,Int64}}, ::Int64) at /home/user/.julia/v0.6/Flux/src/tracker/lib.jl:9
From what I know, the problem is a call to similar with empty tuple as last parameter (in function toarray) - In Julia, there isn't such a thing as a 0-dimensional sparse array AFAIK.
Thank you
The text was updated successfully, but these errors were encountered:
marekdedic
changed the title
Member Access fails when SparseVector is used
Member access fails when SparseVector is used
Sep 25, 2017
Hi, I got this error while trying to use sparse matrices and vectors with Flux.
From what I know, the problem is a call to
similar
with empty tuple as last parameter (in functiontoarray
) - In Julia, there isn't such a thing as a 0-dimensional sparse array AFAIK.Thank you
The text was updated successfully, but these errors were encountered: