@@ -7,7 +7,6 @@ function test_mapreduce(AT)
7
7
@test compare ((A,R)-> Base. mapreducedim! (identity, + , R, A), AT, rand (range, sz), zeros (ET, red))
8
8
@test compare ((A,R)-> Base. mapreducedim! (identity, * , R, A), AT, rand (range, sz), ones (ET, red))
9
9
@test compare ((A,R)-> Base. mapreducedim! (x-> x+ x, + , R, A), AT, rand (range, sz), zeros (ET, red))
10
- return
11
10
end
12
11
13
12
# implicit singleton dimensions
@@ -141,14 +140,14 @@ function test_mapreduce(AT)
141
140
@test compare (x-> mapreduce (_addone, + , x; dims = 2 , init = _zero),
142
141
AT, rand (range, N, N))
143
142
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),
145
146
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))
148
147
end
149
148
end
150
149
@testset " sum maximum minimum prod" begin
151
- for dims in ((4048 ,), (1024 , 1024 ), ( 77 ,), (1923 ,209 ))
150
+ for dims in ((4048 ,), (77 ,), (1923 ,209 ))
152
151
@test compare (sum, AT, rand (range, dims))
153
152
@test compare (prod, AT, rand (range, dims))
154
153
@test compare (x -> sum (abs, x), AT, rand (range, dims))
0 commit comments