@@ -7,7 +7,6 @@ function test_mapreduce(AT)
77 @test compare ((A,R)-> Base. mapreducedim! (identity, + , R, A), AT, rand (range, sz), zeros (ET, red))
88 @test compare ((A,R)-> Base. mapreducedim! (identity, * , R, A), AT, rand (range, sz), ones (ET, red))
99 @test compare ((A,R)-> Base. mapreducedim! (x-> x+ x, + , R, A), AT, rand (range, sz), zeros (ET, red))
10- return
1110 end
1211
1312 # implicit singleton dimensions
@@ -141,14 +140,14 @@ function test_mapreduce(AT)
141140 @test compare (x-> mapreduce (_addone, + , x; dims = 2 , init = _zero),
142141 AT, rand (range, N, N))
143142
144- @test compare (x-> mapreduce (+ , + , x; dims = 2 ),
143+ @test compare ((x,y)-> mapreduce (+ , + , x, y; dims = 2 ),
144+ AT, rand (range, N, N), rand (range, N, N))
145+ @test compare ((x,y)-> mapreduce (+ , + , x, y; dims = 2 , init = _zero),
145146 AT, rand (range, N, N), rand (range, N, N))
146- @test compare (x-> mapreduce (+ , + , x; dims = 2 , init = _zero),
147- AT, rand (range, N, N). rand (range, N, N))
148147 end
149148 end
150149 @testset " sum maximum minimum prod" begin
151- for dims in ((4048 ,), (1024 , 1024 ), ( 77 ,), (1923 ,209 ))
150+ for dims in ((4048 ,), (77 ,), (1923 ,209 ))
152151 @test compare (sum, AT, rand (range, dims))
153152 @test compare (prod, AT, rand (range, dims))
154153 @test compare (x -> sum (abs, x), AT, rand (range, dims))
0 commit comments