SciML / SciML/RecursiveArrayTools.jl

similar() of ArrayPartition involving primitives fails

Open
#292 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

If I have an ArrayPartition involving a primitive type, such as a regular number, creating a similar through similar array fails.
Example:

using RecursiveArrayTools
a = randn()
b = randn(5,5)
arr_part = ArrayPartition(a,b)
similar(arr_part) # fails

ArrayPartitions are not designed for single numbers, but it would be nice if it also works for these types.

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.

Research direction

Start at the ArrayPartition implementation and trace the similar(arr_part) dispatch for partitions containing a scalar and an array. Reproduce the Julia example from the issue, then add coverage for this case and confirm that similar(arr_part) succeeds for the shown ArrayPartition.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.