Skip to content

Commit

Permalink
v1.0, add README
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed May 16, 2024
1 parent 3c9abe3 commit 8621223
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "BlockArrays"
uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
version = "1.0.0-dev"
version = "1.0.0"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Secondly, it also implements two different type of block arrays that follow the

A simple way to produce `BlockArray`s is via `mortar`, which combines an array of arrays into a `BlockArray`:
```julia
julia> using BlockArrays

julia> mortar([randn(3), randn(4)])
2-blocked 7-element BlockVector{Float64}:
-0.19808699390960527
Expand All @@ -33,11 +35,41 @@ julia> mortar(reshape([randn(2,2), randn(1,2), randn(2,3), randn(1,3)],2,2))
0.430093 -0.0263753-1.31275 0.278447 -0.139579
```

Alternatively, one can add block structure on top of an existing array by wrapping the array in `BlockedArray`, where the extra arguments give the sizes of the blocks:
```julia
julia> BlockedArray(randn(7), [3,4])
2-blocked 7-element BlockedVector{Float64}:
-0.17348560551451797
-0.5680124317024628
1.699007590285868
─────────────────────
-0.7437814954416642
-0.018198226033108045
1.3335354818213445
-0.03512135185007728

julia> BlockedArray(randn(3,5), [2,1], [2,3])
2×2-blocked 3×5 BlockedMatrix{Float64}:
0.444186 0.7888230.743428 -0.815026 0.715779
-0.721074 -0.437831.07413 -0.336926 0.539873
──────────────────────┼─────────────────────────────────
0.128836 -0.350202-2.71365 1.67605 -0.25611
```


## Documentation

- [**STABLE**][docs-stable-url] — **most recently tagged version of the documentation.**
- [**LATEST**][docs-dev-url] — *in-development version of the documentation.*

## Changes in v1.0

We are excited to release v1.0! There are some important breaking changes from previous versions of BlockArrays.jl:

- `BlockedArray` replaces `PseudoBlockArray`.
- Axes are now typically `BlockedOneTo` instead of `BlockUnitRange`.
- Support for some simple block-banded matrices has been moved here from BlockBandedMatrices.jl

## Contributing

Possible ways of contributing to this package include:
Expand Down

0 comments on commit 8621223

Please sign in to comment.