Skip to content

Commit ac80508

Browse files
committed
Avoid extremes in broadcasting test (i.e., don't exp(rand(Int))
1 parent 1081aff commit ac80508

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/broadcast.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@
3838
@avx @. c2 = a + bl;
3939
@test c1 c2
4040

41-
xs = rand(T, M);
42-
max_ = maximum(xs, dims=1)
41+
if T <: Integer
42+
xs = rand(-T(100):T(100), M);
43+
else
44+
xs = rand(T, M);
45+
end
46+
max_ = maximum(xs, dims=1);
4347
@test (@avx exp.(xs .- LowDimArray{(false,)}(max_))) exp.(xs .- LowDimArray{(false,)}(max_))
4448

4549
if T === Int32

0 commit comments

Comments
 (0)