diff --git a/Project.toml b/Project.toml index 37f2543..143f86d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "BlockSparseArrays" uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4" authors = ["ITensor developers and contributors"] -version = "0.9.2" +version = "0.9.3" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/BlockArraysExtensions/BlockArraysExtensions.jl b/src/BlockArraysExtensions/BlockArraysExtensions.jl index e690bee..5bbad0b 100644 --- a/src/BlockArraysExtensions/BlockArraysExtensions.jl +++ b/src/BlockArraysExtensions/BlockArraysExtensions.jl @@ -278,7 +278,7 @@ function _blockreshape(a::AbstractArray, axes::Tuple{Vararg{AbstractUnitRange}}) return reshape(reshaped_blocks_a[I], block_axes_I) end bs = Dict(Block(Tuple(I)) => f(I) for I in eachstoredindex(reshaped_blocks_a)) - if !isconcretetype(eltype(bs)) + if !isconcretetype(keytype(bs)) || !isconcretetype(valtype(bs)) # This branch only seems to be required in Julia 1.10, not Julia 1.11. # TODO: Remove this branch once Julia 1.10 support is dropped. bs = Dict{Block{length(axes),Int},AbstractArray{eltype(a),length(axes)}}()