Skip to content
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

Comprehension gives Array{Any} when iterating over some tuples #5306

Closed
nalimilan opened this issue Jan 4, 2014 · 1 comment
Closed

Comprehension gives Array{Any} when iterating over some tuples #5306

nalimilan opened this issue Jan 4, 2014 · 1 comment

Comments

@nalimilan
Copy link
Member

I can't explain the difference between the two arrays built via the comprehension syntax.

julia> [a for a in ntuple(3, i -> i)]
3-element Array{Any,1}:
 1
 2
 3

julia> xdump(ntuple(3, i -> i))
(Int64,Int64,Int64) (1,2,3)

julia> ntuple(3, i -> i) === (1, 2, 3)

julia> [a for a in (1, 2, 3)]
3-element Array{Int64,1}:
 1
 2
 3
@jiahao
Copy link
Member

jiahao commented Jan 4, 2014

Duplicate of #524 via #5258?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants