@@ -39,8 +39,8 @@ arbitrary_fun(x, y) = cor(x, y)
39
39
40
40
@inferred pairwise (f, x, y)
41
41
42
- @test_throws ArgumentError pairwise (f, [Int[]], [Int[]])
43
- @test_throws ArgumentError pairwise! (f, zeros (1 , 1 ), [Int[]], [Int[]])
42
+ @test_throws Union{ ArgumentError,MethodError} pairwise (f, [Int[]], [Int[]])
43
+ @test_throws Union{ ArgumentError,MethodError} pairwise! (f, zeros (1 , 1 ), [Int[]], [Int[]])
44
44
45
45
res = pairwise (f, [], [])
46
46
@test size (res) == (0 , 0 )
@@ -144,12 +144,12 @@ arbitrary_fun(x, y) = cor(x, y)
144
144
@test res ≅ res2 ≅ [f (xi, yi) for xi in xm, yi in ym]
145
145
146
146
if VERSION >= v " 1.5" # Fails with UndefVarError on Julia 1.0
147
- @test_throws ArgumentError pairwise (f, xm, ym, skipmissing= :pairwise )
148
- @test_throws ArgumentError pairwise (f, xm, ym, skipmissing= :listwise )
147
+ @test_throws Union{ ArgumentError,MethodError} pairwise (f, xm, ym, skipmissing= :pairwise )
148
+ @test_throws Union{ ArgumentError,MethodError} pairwise (f, xm, ym, skipmissing= :listwise )
149
149
150
150
res = zeros (Union{Float64, Missing}, length (xm), length (ym))
151
- @test_throws ArgumentError pairwise! (f, res, xm, ym, skipmissing= :pairwise )
152
- @test_throws ArgumentError pairwise! (f, res, xm, ym, skipmissing= :listwise )
151
+ @test_throws Union{ ArgumentError,MethodError} pairwise! (f, res, xm, ym, skipmissing= :pairwise )
152
+ @test_throws Union{ ArgumentError,MethodError} pairwise! (f, res, xm, ym, skipmissing= :listwise )
153
153
end
154
154
155
155
for sm in (:pairwise , :listwise )
0 commit comments