Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BlockSparseArrays"
uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4"
authors = ["ITensor developers <support@itensor.org> and contributors"]
version = "0.9.4"
version = "0.9.5"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
3 changes: 2 additions & 1 deletion src/blocksparsearrayinterface/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ end
# which is logic that is handled by `fill!`.
function copyto_blocksparse!(dest::AbstractArray, bc::Broadcasted{<:AbstractArrayStyle{0}})
# `[]` is used to unwrap zero-dimensional arrays.
value = @allowscalar bc.f(bc.args...)[]
bcf = Broadcast.flatten(bc)
value = @allowscalar bcf.f(map(arg -> arg[], bcf.args)...)
return @interface BlockSparseArrayInterface() fill!(dest, value)
end

Expand Down
Loading