Skip to content

Commit f76ce66

Browse files
committed
fix ambiguity errors
1 parent e26bcf3 commit f76ce66

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

ext/KroneckerArraysBlockSparseArraysExt/KroneckerArraysBlockSparseArraysExt.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ using BlockArrays: Block
44
using BlockSparseArrays: BlockIndexVector, GenericBlockIndex
55
using KroneckerArrays: CartesianPair, CartesianProduct
66
function Base.getindex(
7-
b::Block,
8-
I1::Union{CartesianPair, CartesianProduct},
9-
Irest::Union{CartesianPair, CartesianProduct}...,
10-
)
11-
return GenericBlockIndex(b, (I1, Irest...))
7+
b::Block{N},
8+
I::Vararg{Union{CartesianPair, CartesianProduct}, N}
9+
) where {N}
10+
return GenericBlockIndex(b, I)
1211
end
13-
function Base.getindex(b::Block, I1::CartesianProduct, Irest::CartesianProduct...)
14-
return BlockIndexVector(b, (I1, Irest...))
12+
function Base.getindex(b::Block{N}, I::Vararg{CartesianProduct, N}) where {N}
13+
return BlockIndexVector(b, I)
1514
end
1615

1716
using BlockSparseArrays: BlockSparseArrays, blockrange

0 commit comments

Comments
 (0)