JuliaArrays / JuliaArrays/AxisArrays.jl
Dot-assignment fails with `MethodError: no method matching dotview`
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 207
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
julia> using AxisArrays
julia> x = AxisArray(rand(3, 3));
julia> x[row=1:2] .= 1
ERROR: MethodError: no method matching dotview(::AxisArray{Float64,2,Array{Float64,2},Tuple{Axis{:row,Base.OneTo{Int64}},Axis{:col,Base.OneTo{Int64}}}}; row=1:2)
Closest candidates are:
dotview(::Any...) at broadcast.jl:1138 got unsupported keyword argument "row"
dotview(::BitArray, ::BitArray) at broadcast.jl:1108 got unsupported keyword argument "row"
Stacktrace:
[1] top-level scope at REPL[4]:1
[2] eval(::Module, ::Any) at ./boot.jl:331
[3] eval_user_input(::Any, ::REPL.REPLBackend) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
[4] run_backend(::REPL.REPLBackend) at /Users/sean/.julia/packages/Revise/C272c/src/Revise.jl:1075
[5] top-level scope at none:0
(Julia 1.4.1, AxisArrays 0.4.3)
In NamedDims.jl the dotview method was defined to give this functionality, see comment here, is this needed here?
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 1.4.1 example with AxisArrays 0.4.3, then inspect the referenced NamedDims.jl implementation in src/wrapper_array.jl and compare its dotview behavior. Confirm the expected approach and verify that named-axis dot-assignment no longer raises the reported MethodError.
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