JuliaGaussianProcesses / JuliaGaussianProcesses/KernelFunctions.jl
getindex with ColVecs
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 275
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
We currently return a view to the underlying data when getindex is called on a ColVecs. See https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/blob/2d172125e72ca932133266c3b23d0865bec539df/src/utils.jl#L76
@theogf was the last person to touch this bit of code, but I'm not sure who wrote it initially (I don't think it was me). Perhaps @devmotion ?
My concern is that if you do getindex, rather thanview, my intuition is that I wouldn't get a view of the underlying data back, but a copy in a new location in memory. Any thoughts on whether my intuition is off, or should we change this?
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 at src/utils.jl around the linked getindex implementation and review how ColVecs indexing is intended to behave in Julia. Resolve whether getindex should return a copy or a view, then ensure the documented behavior and implementation agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100