@@ -153,10 +153,10 @@ end
153153 for ksize in 0 : 3
154154 sh = rand(Int32(1 ): Int32(100 ), isize, jsize, ksize)
155155 s = array_from_host(sh)
156- d = AK. reduce(+ , s; init= Int32(10 ), dims= dims )
156+ d = AK. reduce(+ , s; init= Int32(10 ), dims)
157157 dh = Array(d)
158- @test dh == sum(sh, init= Int32(10 ), dims = dims)
159- @test eltype(dh) == eltype(sum(sh, init= Int32(10 ), dims = dims))
158+ @test dh == sum(sh; init= Int32(10 ), dims)
159+ @test eltype(dh) == eltype(sum(sh; init= Int32(10 ), dims))
160160 end
161161 end
162162 end
170170 n3 = rand(1 : 100 )
171171 vh = rand(Int32(1 ): Int32(100 ), n1, n2, n3)
172172 v = array_from_host(vh)
173- s = AK. reduce(+ , v; init= Int32(0 ), dims= dims )
173+ s = AK. reduce(+ , v; init= Int32(0 ), dims)
174174 sh = Array(s)
175- @test sh == sum(vh, dims = dims)
175+ @test sh == sum(vh; dims)
176176 end
177177 end
178178
183183 n3 = rand(1 : 100 )
184184 vh = rand(UInt32(1 ): UInt32(100 ), n1, n2, n3)
185185 v = array_from_host(vh)
186- s = AK. reduce(+ , v; init= UInt32(0 ), dims= dims )
186+ s = AK. reduce(+ , v; init= UInt32(0 ), dims)
187187 sh = Array(s)
188- @test sh == sum(vh, dims = dims)
188+ @test sh == sum(vh; dims)
189189 end
190190 end
191191
196196 n3 = rand(1 : 100 )
197197 vh = rand(Float32, n1, n2, n3)
198198 v = array_from_host(vh)
199- s = AK. reduce(+ , v; init= Float32(0 ), dims= dims )
199+ s = AK. reduce(+ , v; init= Float32(0 ), dims)
200200 sh = Array(s)
201- @test sh ≈ sum(vh, dims = dims)
201+ @test sh ≈ sum(vh; dims)
202202 end
203203 end
204204
211211 vh = rand(Int32(1 ): Int32(100 ), n1, n2, n3)
212212 v = array_from_host(vh)
213213 init = rand(1 : 100 )
214- s = AK. reduce(+ , v; init= Int32(init), dims= dims )
214+ s = AK. reduce(+ , v; init= Int32(init), dims)
215215 sh = Array(s)
216- @test sh == reduce(+ , vh, dims= dims, init = init)
216+ @test sh == reduce(+ , vh; dims, init)
217217 end
218218 end
219219
321321 init = rand(1 : 100 )
322322 s = AK. mapreduce(abs, + , v; switch_below= switch_below, init= Int32(init))
323323 vh = Array(v)
324- @test s == mapreduce(abs, + , vh, init = init)
324+ @test s == mapreduce(abs, + , vh; init)
325325 end
326326
327327 # Test with unmaterialised ranges
@@ -363,10 +363,10 @@ end
363363 for ksize in 0 : 3
364364 sh = rand(Int32(- 100 ): Int32(100 ), isize, jsize, ksize)
365365 s = array_from_host(sh)
366- d = AK. mapreduce(- , + , s; init= Int32(- 10 ), dims= dims )
366+ d = AK. mapreduce(- , + , s; init= Int32(- 10 ), dims)
367367 dh = Array(d)
368- @test dh == mapreduce(- , + , sh, init= Int32(- 10 ), dims = dims)
369- @test eltype(dh) == eltype(mapreduce(- , + , sh, init= Int32(- 10 ), dims = dims))
368+ @test dh == mapreduce(- , + , sh; init= Int32(- 10 ), dims)
369+ @test eltype(dh) == eltype(mapreduce(- , + , sh; init= Int32(- 10 ), dims))
370370 end
371371 end
372372 end
380380 n3 = rand(1 : 100 )
381381 vh = rand(Int32(1 ): Int32(100 ), n1, n2, n3)
382382 v = array_from_host(vh)
383- s = AK. mapreduce(- , + , v; init= Int32(0 ), dims= dims )
383+ s = AK. mapreduce(- , + , v; init= Int32(0 ), dims)
384384 sh = Array(s)
385- @test sh == mapreduce(- , + , vh, init= Int32(0 ), dims = dims)
385+ @test sh == mapreduce(- , + , vh; init= Int32(0 ), dims)
386386 end
387387 end
388388
394394 s;
395395 init= (typemax(Float32), typemax(Float32)),
396396 neutral= (typemax(Float32), typemax(Float32)),
397- dims= dims ,
397+ dims,
398398 )
399399 end
400400
405405 (a, b) -> (a[1 ] < b[1 ] ? a[1 ] : b[1 ], a[2 ] < b[2 ] ? a[2 ] : b[2 ]),
406406 s;
407407 init= (typemax(Float32), typemax(Float32)),
408- dims= dims ,
408+ dims,
409409 )
410410 end
411411
439439 vh = rand(Int32(- 100 ): Int32(100 ), n1, n2, n3)
440440 v = array_from_host(vh)
441441 init = rand(1 : 100 )
442- s = AK. mapreduce(- , + , v; init= Int32(init), dims= dims )
442+ s = AK. mapreduce(- , + , v; init= Int32(init), dims)
443443 sh = Array(s)
444- @test sh == mapreduce(- , + , vh, dims= dims, init = init)
444+ @test sh == mapreduce(- , + , vh; dims, init)
445445 end
446446 end
447447
502502 @test AK. sum(v) == sum(vh)
503503
504504 # Along dimensions
505- r = Array(AK. sum(v, dims = dims))
506- rh = sum(vh, dims = dims)
505+ r = Array(AK. sum(v; dims))
506+ rh = sum(vh; dims)
507507
508508 @test r == rh
509509 end
544544 @test AK. sum(v) == sum(vh)
545545
546546 # Along dimensions
547- r = Array(AK. sum(v, dims = dims))
548- rh = sum(vh, dims = dims)
547+ r = Array(AK. sum(v; dims))
548+ rh = sum(vh; dims)
549549
550550 @test r == rh
551551 end
586586 @test AK. minimum(v) == minimum(vh)
587587
588588 # Along dimensions
589- r = Array(AK. minimum(v, dims = dims))
590- rh = minimum(vh, dims = dims)
589+ r = Array(AK. minimum(v; dims))
590+ rh = minimum(vh; dims)
591591
592592 @test r == rh
593593 end
628628 @test AK. maximum(v) == maximum(vh)
629629
630630 # Along dimensions
631- r = Array(AK. maximum(v, dims = dims))
632- rh = maximum(vh, dims = dims)
631+ r = Array(AK. maximum(v; dims))
632+ rh = maximum(vh; dims)
633633
634634 @test r == rh
635635 end
670670 @test AK. count(x-> x> 0.5 , v) == count(x-> x> 0.5 , vh)
671671
672672 # Along dimensions
673- r = Array(AK. count(x-> x> 0.5 , v, dims = dims))
674- rh = count(x-> x> 0.5 , vh, dims = dims)
673+ r = Array(AK. count(x-> x> 0.5 , v; dims))
674+ rh = count(x-> x> 0.5 , vh; dims)
675675
676676 @test r == rh
677677 end
0 commit comments