In Julia map(rad2deg, ([1],[2]) )
works. In 0.6 is is deprecated:
julia> map(rad2deg, ([1], [2]))
WARNING: rad2deg{T <: Real}(x::AbstractArray{T}) is deprecated, use rad2deg.(x) instead.
Stacktrace:
[1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
[2] rad2deg(::Array{Int64,1}) at ./deprecated.jl:57
[3] map(::Base.Math.#rad2deg, ::Tuple{Array{Int64,1},Array{Int64,1}}) at ./tuple.jl:159
[4] eval(::Module, ::Any) at ./boot.jl:235
[5] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
[6] macro expansion at ./REPL.jl:97 [inlined]
[7] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
while loading no file, in expression starting on line 0
([57.2958], [114.592])
using an array comprehension works:
julia> [rad2deg.(i) for i in ([1], [2])]
2-element Array{Array{Float64,1},1}:
[57.2958]
[114.592]
as I can add the .
. Is there a way to still use map
?