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

Unable to create typed array of arrays #7329

Closed
kmsquire opened this issue Jun 20, 2014 · 2 comments
Closed

Unable to create typed array of arrays #7329

kmsquire opened this issue Jun 20, 2014 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@kmsquire
Copy link
Member

According to #3737 (comment), I think this should be possible:

julia> pts = [1 2;3 4]
2x2 Array{Int64,2}:
 1  2
 3  4

julia> Array{Array{Int64,2}}[pts]
ERROR: no method convert(Type{Array{Int64,2}}, Int64)
 in copy! at abstractarray.jl:149
 in getindex at array.jl:121
@kmsquire kmsquire added the bug label Jun 20, 2014
@kmsquire kmsquire changed the title Unable to create immediate typed array of arrays Unable to create typed array of arrays Jun 20, 2014
@kmsquire
Copy link
Member Author

And I thought this was a way around it. Am I missing something?

julia> push!(Array{Array{Int,2}}[], pts)
ERROR: no method convert(Type{Array{Float64,2}}, Int64)
 in copy! at abstractarray.jl:149
 in push! at array.jl:457

@kmsquire
Copy link
Member Author

Never mind. Wrong array type. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant