-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
using BlockSparseArrays: BlockSparseArray
b = BlockSparseArray{Float64}([2, 3], [2, 3])
b[2, 4] = 24
using NamedDimsArrays: NamedDimsArray
bᵢⱼ = NamedDimsArray(b, ("i", "j"))
bⱼᵢ = NamedDimsArray(b, ("j", "i"))
# Broken
bᵢⱼ .+ 2 .* bⱼᵢ
outputs:
MethodError: no method matching similar(::Base.Broadcast.Broadcasted{BlockSparseArrays.BlockSparseArrayStyle{2}, Tuple{BlockArrays.BlockedOneTo{Int64, Vector{Int64}}, BlockArrays.BlockedOneTo{Int64, Vector{Int64}}}, MapBroadcast.MapFunction{typeof(+), Tuple{MapBroadcast.Arg, MapBroadcast.MapFunction{typeof(*), Tuple{Int64, MapBroadcast.Arg}}}}, Tuple{PermutedDimsArray{Float64, 2, (1, 2), (1, 2), BlockSparseArrays.BlockSparseMatrix{Float64, Matrix{Float64}, SparseArraysBase.SparseMatrixDOK{Matrix{Float64}, BlockSparseArrays.GetUnstoredBlock{Tuple{BlockArrays.BlockedOneTo{Int64, Vector{Int64}}, BlockArrays.BlockedOneTo{Int64, Vector{Int64}}}}}, Tuple{BlockArrays.BlockedOneTo{Int64, Vector{Int64}}, BlockArrays.BlockedOneTo{Int64, Vector{Int64}}}}}, PermutedDimsArray{Float64, 2, (2, 1), (2, 1), BlockSparseArrays.BlockSparseMatrix{Float64, Matrix{Float64}, SparseArraysBase.SparseMatrixDOK{Matrix{Float64}, BlockSparseArrays.GetUnstoredBlock{Tuple{BlockArrays.BlockedOneTo{Int64, Vector{Int64}}, BlockArrays.BlockedOneTo{Int64, Vector{Int64}}}}}, Tuple{BlockArrays.BlockedOneTo{Int64, Vector{Int64}}, BlockArrays.BlockedOneTo{Int64, Vector{Int64}}}}}}}, ::Type{Float64}, ::Tuple{BlockArrays.BlockedOneTo{Int64, Vector{Int64}}, BlockArrays.BlockedOneTo{Int64, Vector{Int64}}})
The function `similar` exists, but no method is defined for this combination of argument types.
[...]
with:
Status `/private/var/folders/qz/q22pzwm144z9fq57mpf1hfp40000gq/T/jl_8PCp9k/Project.toml`
[2c9a651f] BlockSparseArrays v0.2.12
[60cbd0c0] NamedDimsArrays v0.4.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working