Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ArrayPartition within ArrayPartition

Open
#46 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia
Domain
data

Research direction

Start by running the Julia reproduction in the issue with nested ArrayPartition values and inspect how multiplication constructs the result. Determine whether the inner array type should be preserved, then add a regression test for the demonstrated case and verify the resulting nested type and values.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Julia
Stars
233
Forks
76
Avg merge
2h 17m
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SciML/RecursiveArrayTools.jl

All issues in SciML/RecursiveArrayTools.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.