-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect type when using dot syntax for broadcasting, in Julia 0.4 #282
Comments
The type computation in Maybe |
But in Julia 0.4 this returns the correct type: typeof(broadcast(sin, 0.0:10.0))
# => Array{Float64,1}
x = 0.0:10.0
typeof(broadcast(sin, x))
# => Array{Float64,1} May it be a problem with parsing the named variable within the macro? |
This is not fixable without actually backporting a significant amount of 0.5 code back to 0.4 in Compat. The broadcast syntax compat uses the same algorithm (well, it directly uses) for comprehension so the return type is as good as that. If you make |
Run the following code in Julia 0.4
while I'd expect type
Array{Float64,1}
. This is a problem because, for example,fft
doesn't work withArray{Any}
. It happens only if the argument is a named variable,@compat(sin.(0:10))
works as expected.The text was updated successfully, but these errors were encountered: