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
Currently this does not work due to a missing spzeros method:
rdims = (2,2)
perm = [2,4,1,3]
A =sparse([1,4,2,3,2,3,1,4],[1,1,2,2,3,3,4,4],[0.125,0.125,0.375,0.375,0.375,0.375,0.125,0.125])
B =reshape(A,rdims...,rdims...)
C =permutedims(B,perm)
ERROR: MethodError: no method matching spzeros(::Type{Float64}, ::Int64, ::Int64, ::Int64, ::Int64)
Closest candidates are:spzeros(::Type, ::Integer, ::Integer) at sparse\sparsematrix.jl:1372spzeros(::Type, ::Type, ::Integer, ::Integer) at sparse\sparsematrix.jl:1374spzeros(::Type{T}, ::Integer) where T at sparse\sparsevector.jl:47...
Stacktrace:
[1] similar(::Base.ReshapedArray{Float64,4,SparseMatrixCSC{Float64,Int64},Tuple{Base.MultiplicativeInverses.S
ignedMultiplicativeInverse{Int64}}}, ::NTuple{4,Base.OneTo{Int64}}) at .\abstractarray.jl:514
[2] permutedims(::Base.ReshapedArray{Float64,4,SparseMatrixCSC{Float64,Int64},Tuple{Base.MultiplicativeInvers
es.SignedMultiplicativeInverse{Int64}}}, ::Array{Int64,1}) at .\permuteddimsarray.jl:115
Just trying to copy(B) also fails for the same reason.
It seems like it should work, since the following does work:
C =reshape(copy(A),rdims...,rdims...)
permutedims!(C,B,perm)
The text was updated successfully, but these errors were encountered:
Currently this does not work due to a missing
spzeros
method:Just trying to
copy(B)
also fails for the same reason.It seems like it should work, since the following does work:
The text was updated successfully, but these errors were encountered: