when you index a sparse matrix, S[idx]
, it gets lowered to getindex(S, idx)
, when you wrap it inside an OffsetArray
, and do OA[idx2]
, all it is doing is to translate idx2
→ idx3
according to your offset and then get index S[idx3]
. So there’s not much that can go wrong, and there’s no “incompatible” because everything is just getindex
4 Likes