BlockArrays.jl icon indicating copy to clipboard operation
BlockArrays.jl copied to clipboard

BlockArrays for Julia

Results 93 BlockArrays.jl issues
Sort by recently updated
recently updated
newest added

Hello, I'm trying to parallelize a code making use of BlockArrays. For this, I am using CUDA, and its array type CuArrays. However, I've noticed a strange behaviour when running...

Most block array operations can naturally be multi-threaded. It would be good to do this automatically in order to make this package competitive speed-wise.

This should throw an error: ```julia julia> v = BlockArray(randn(3),1:2) 2-blocked 3-element BlockVector{Float64, Vector{Vector{Float64}}, Tuple{BlockedUnitRange{ArrayLayouts.RangeCumsum{Int64, UnitRange{Int64}}}}}: -0.5110413514378647 ─────────────────── 0.5939308866063546 -0.9983642145180261 julia> v[Block(1,2)] 1×1-blocked 1×1 BlockMatrix{Float64, Matrix{Matrix{Float64}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}: -0.5110413514378647 ```...

I just ran into the following behavior (due to another bug in my own code): ```julia julia> a = mortar([Bool[], Bool[], [true, false]]) julia> a .|| a ERROR: BoundsError: attempt...

PseudoBlockMatrix is a structured wrapper to a native array. This is why the following came as a surprise: ``` using BlockArrays n = 800 M = rand(2n,2n) v = rand(2n)...

At the moment we combine the block structure in broadcasting. E.g.: ```julia julia> mortar([[1,2],[3,4,5]]) + mortar([[1],[2,3,4],[5]]) 4-blocked 5-element BlockVector{Int64}: 2 ── 4 ── 6 8 ── 10 ``` But this...

This came up while trying to use an implicit solver with OrdinaryDiffEq. A simple reproducible example: ```julia julia> using BlockArrays, LinearAlgebra julia> x = BlockArray(rand(3)) 1-blocked 3-element BlockVector{Float64, Vector{Vector{Float64}}, Tuple{Base.OneTo{Int64}}}:...

``` using BlocksArrays, NamedArrays m1 = mortar(NamedArray([rand(i,j) for i=1:2, j=1:3], (x=["a","b"], y=["c","d","e"]))) m2 = mortar(NamedArray([rand(i,j) for i=1:2, j=1:3], (x=["a","b"], y=["c","d","e"]))) m1 .* m2 # 2×3-blocked 3×6 BlockMatrix{Float64} ``` The result...

Reproducing example: ``` eachblockrow(x) = (view(x,b,:) for b in blockaxes(x,1)) f(x) = x # just for illustrating use case m = mortar([mortar([rand(1,j) for k=1:i, _=1:1]) for i=2:4, j=3:5]) Matrix(m) #...