On Sat, Feb 15, 2014 at 4:48 AM, Jacob Quinn <[email protected]> wrote:
> Try the following:
>
> b = [a[i]::Int64 for i=1:3]
>
>
>
Yes, that works. For completeness, I'd say that it is better to write:
b = [a[i]::Int for i=1:3]
so that the same code works for 32-bit and 64-bit machines.
This is not only a performance issue. The following code doesn't work:
a = [i for i=1:3]
b = [a[i]::Int for i=1:3]
c = exp(b)
Is this something that the compiler will be able to work-out in the future
or shall I always annotate all my numeric arrays?