JuliaArrays / JuliaArrays/BlockArrays.jl
Examples of mortar() for nd arrays?
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 254
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
The docstring for mortar() shows
mortar(blocks::AbstractArray{R, N}, sizes_1, sizes_2, ..., sizes_N)
But I can't figure out how to use this. Here's what I expected to work:
julia> arr = [[rand(2,3,4)] [rand(2,3,4)]
[rand(2,3,4)] [rand(2,3,4)]];
julia> typeof(arr)
Matrix{Array{Float64, 3}} (alias for Array{Array{Float64, 3}, 2})
julia> mortar(arr, [2,2], [3,3], ones(Int, 4))
ERROR: MethodError: no method matching mortar(::Matrix{Array{Float64, 3}}, ::Vector{Int64}, ::Vector{Int64}, ::Vector{Int64})
I was expecting this to produce the equivalent of
julia> BlockedArray(rand(4,6,4), [2,2], [3,3], ones(Int, 4))
2×2×4-blocked 4×6×4 BlockedArray{Float64, 3}:
# ...
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
Start with the mortar() docstring and reproduce the reported Julia REPL call using the shown arr and block sizes. Compare it with the BlockedArray(rand(4,6,4), ...) example; done means documenting the correct nd-array usage or clearly stating the supported limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100