Skip to content

Commit

Permalink
Fix #97 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty authored Sep 13, 2023
1 parent f230380 commit 9d46d9e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "QuasiArrays"
uuid = "c4ea9172-b204-11e9-377d-29865faadc5c"
authors = ["Sheehan Olver <[email protected]>"]
version = "0.11.1"
version = "0.11.2"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
2 changes: 1 addition & 1 deletion src/quasibroadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Base.similar(bc::Broadcasted{QuasiArrayConflict}, ::Type{ElType}) where ElType =
_axes(bc::Broadcasted{<:AbstractQuasiArrayStyle{0}}, ::Nothing) = ()

_eachindex(t::Tuple{AbstractQuasiVector{<:Number}}) = QuasiCartesianIndices(t)
_eachindex(t::NTuple{N,AbstractQuasiVector{<:Number}}) where N = QuasiCartesianIndices(t)
_eachindex(t::Tuple{AbstractQuasiVector{<:Number},Vararg{Any}}) = QuasiCartesianIndices(t)
_eachindex(t::Tuple{AbstractQuasiVector{<:Number},Vararg{AbstractUnitRange}}) = QuasiCartesianIndices(t)
_eachindex(t::Tuple{AbstractUnitRange,AbstractQuasiVector{<:Number},Vararg{AbstractUnitRange}}) = QuasiCartesianIndices(t)

Expand Down
6 changes: 6 additions & 0 deletions test/test_quasibroadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,4 +293,10 @@ import QuasiArrays: QuasiCartesianIndex, QuasiCartesianIndices, DefaultQuasiArra
v = view(a, BroadcastArray(+, [0.1,0.2]), 0.2)
@test Base.BroadcastStyle(typeof(v)) isa LazyArrays.LazyArrayStyle{1}
end

@testset "empty broadcast bug" begin
A = ones(Int, 4)
A[ones(Int)] .+= 1
@test A == [2,1,1,1]
end
end

2 comments on commit 9d46d9e

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/91336

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.11.2 -m "<description of version>" 9d46d9e193083d4b4fb8aea6de5b3c5a3aa1e130
git push origin v0.11.2

Please sign in to comment.