Skip to content

Commit 06d9939

Browse files
authored
Fix some ambiguity issues related to upstream changes (#53)
1 parent e26bcf3 commit 06d9939

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "KroneckerArrays"
22
uuid = "05d0b138-81bc-4ff7-84be-08becefb1ccc"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.2.6"
4+
version = "0.2.7"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

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)