SciML / SciML/RecursiveArrayTools.jl

should use broadcast for vector space calculations?

Open
#187 1 comment 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

https://github.com/SciML/RecursiveArrayTools.jl/blob/569a07e9f0ecaacef167ee52e8101122a25c9b4a/test/partitions_test.jl#L78-L82

What's the use case for the vector space interface? using broadcast, rather than overloading +,- would be consistent with AbstractArray interface.

julia> 2 + rand(2)
ERROR: MethodError: no method matching +(::Int64, ::Vector{Float64})
For element-wise addition, use broadcasting with dot syntax: scalar .+ array


julia> 2 .+ rand(2)
2-element Vector{Float64}:
 2.50859350057021
 2.7682555961902384

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 with test/partitions_test.jl at lines 78-82 and read the vector space interface implementation it exercises. Compare its scalar and vector operations with Julia's AbstractArray broadcasting behavior. Done means the intended interface is decided and the relevant tests or documentation reflect that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.