SciML / SciML/RecursiveArrayTools.jl

Define `Base._parentsmatch` for `AbstractVectorOfArray`

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

Nobody has claimed this yet.

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

Description

Copying from a view to a view requires Base._parentsmatch(::TypeOfView1, ::TypeOfView2) I think for optimization reasons. RecursiveArrayTools currently doesn't define this.

Two solutions:

  • RecursiveArrayTools defines
    Base._parentsmatch(::AbstractArray, ::AbstractVectorOfArray) = false
    
  • Base defines
    Base._parentsmatch(::Any, ::Any) = false
    

It's weird that base doesn't define a default for this. They didn't think someone would extend views?

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 by inspecting AbstractVectorOfArray and Base._parentsmatch, then reproduce the view-to-view copy case described in the issue. Compare the two proposed method definitions and confirm which one resolves the optimization or dispatch problem; done means the appropriate definition is added and the copying behavior is verified.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.