We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe53f21 commit 8ad0eabCopy full SHA for 8ad0eab
test/broadcast.jl
@@ -117,6 +117,17 @@ rt = Base.return_types(broadcast, Tuple{Function, Array{Float64, 3}, Array{Int,
117
rt = Base.return_types(broadcast!, Tuple{Function, Array{Float64, 3}, Array{Float64, 3}, Array{Int, 1}})
118
@test length(rt) == 1 && rt[1] == Array{Float64, 3}
119
120
+# f.(args...) syntax (#15032)
121
+let x = [1,3.2,4.7], y = [3.5, pi, 1e-4], α = 0.2342
122
+ @test sin.(x) == broadcast(sin, x)
123
+ @test sin.(α) == broadcast(sin, α)
124
+ @test factorial.(3) == broadcast(factorial, 3)
125
+ @test atan2.(x, y) == broadcast(atan2, x, y)
126
+ @test atan2.(x, y') == broadcast(atan2, x, y')
127
+ @test atan2.(x, α) == broadcast(atan2, x, α)
128
+ @test atan2.(α, y') == broadcast(atan2, α, y')
129
+end
130
+
131
# issue 14725
132
let a = Number[2, 2.0, 4//2, 2+0im] / 2
133
@test eltype(a) == Number
0 commit comments