Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
N5N3 committed Mar 24, 2023
1 parent 3a9950a commit 06cf88b
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 @@ -956,6 +956,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 06cf88b

Please sign in to comment.