On Friday, May 20, 2016 at 8:41:49 AM UTC-4, Scott T wrote:
>
> Noticed this when playing around with the new f.(x) syntax, which I 
> assumed would work like map.
>
> julia> map(sin, 3)
> 0.1411200080598672
>
> julia> map(sin, [3])
> 1-element Array{Float64,1}:
>  0.14112
>
> Map works like I'm used to: number goes to number, array goes to array.
>
> julia> sin.(3)  # same as broadcast(sin, 3)
> ERROR: InexactError()
>
>
This is

     https://github.com/JuliaLang/julia/issues/4883

Basically, the output-type computation in the broadcast function has not 
yet been upgraded to be as good as in map.   Until this is fixed, the 
f.(args) syntax is not nearly as useful as it could be. 

Reply via email to