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

ArrayPartition within ArrayPartition #46

Open
danielmatz opened this issue Nov 26, 2018 · 0 comments
Open

ArrayPartition within ArrayPartition #46

danielmatz opened this issue Nov 26, 2018 · 0 comments

Comments

@danielmatz
Copy link

Is using an ArrayPartition within another ArrayPartition supported? I'm having the following problem:

julia> using StaticArrays, RecursiveArrayTools

julia> x = ArrayPartition(ArrayPartition(@SMatrix [1.1 1.2; 1.3 1.4]), SVector(1.2))
([1.1 1.2; 1.3 1.4], [1.2])

julia> y = 1.1 * x
([1.21, 1.43, 1.32, 1.54], [1.32])

julia> typeof(x.x[1])
ArrayPartition{Float64,Tuple{SArray{Tuple{2,2},Float64,2,4}}}

julia> typeof(y.x[1])
Array{Float64,1}

Somehow the type of the underlying array is being changed. I would have expected that array type to remain the same.

@danielmatz danielmatz changed the title ArrayPartition in ArrayPartition ArrayPartition within ArrayPartition Nov 26, 2018
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

1 participant