Skip to content

ArrayPartition within ArrayPartition #46

Open
@danielmatz

Description

@danielmatz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions