Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
N5N3 committed Jul 29, 2024
1 parent 5a0fa7e commit a23a318
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,10 @@ end
@test sum(bc, dims=1, init=0) == [5]
bc = Broadcast.instantiate(Broadcast.broadcasted(*, ['a','b'], 'c'))
@test prod(bc, dims=1, init="") == ["acbc"]

a = rand(-10:10,32,4); b = rand(-10:10,32,4)
bc = Broadcast.instantiate(Broadcast.broadcasted(+,a,b))
@test sum(bc; dims = 1, init = 0.0) == sum(collect(bc); dims = 1, init = 0.0)
end

# treat Pair as scalar:
Expand Down

0 comments on commit a23a318

Please sign in to comment.