JuliaArrays / JuliaArrays/FillArrays.jl
Broadcasting style for FillArrays?
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 187
- Forks
- 41
- Avg merge
- 17h 29m
- Merged PRs (30d)
- 1
Description
Perhaps we need a broadcasting rule for FillArrays that takes precedence over Broadcast.DefaultArrayStyle{0}. Currently, we obtain the somewhat unsatisfactory
julia> x = Fill(2, 10)
10-element Fill{Int64}, with entries equal to 2
julia> 2 * x * 3
10-element Fill{Int64}, with entries equal to 12
julia> 2 .* x .* 3
10-element Fill{Int64}, with entries equal to 12
julia> @. 2 * x * 3
10-element Vector{Int64}:
12
12
12
12
12
12
12
12
12
12
This may be resolved by defining a custom broadcast style.
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the Julia REPL examples in the issue, especially @. 2 * x * 3 with x = Fill(2, 10). Investigate FillArrays' broadcasting behavior and the proposed custom broadcast style; done means the broadcasted expression preserves the appropriate FillArrays result rather than producing a Vector, with tests covering the shown cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100