SciML / SciML/RecursiveArrayTools.jl
ArrayPartition within ArrayPartition
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 233
- Forks
- 76
- Avg merge
- 2h 17m
- Merged PRs (30d)
- 9
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100