Skip to content

Commit 9141cba

Browse files
committed
readme
1 parent 8a9290d commit 9141cba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Github CI](https://github.com/mcabbott/LazyStack.jl/workflows/CI/badge.svg)](https://github.com/mcabbott/LazyStack.jl/actions?query=workflow%3ACI+branch%3Amaster)
44

5-
This package exports one function, `lazystack`, for turning a list of arrays
5+
This package exports a function `lazystack` for turning a list of arrays
66
into one `AbstractArray`. Given several arrays with the same `eltype`,
77
or an array of such arrays, it returns a lazy `Stacked{T,N}` view of these:
88

@@ -19,12 +19,12 @@ julia> lazystack([pi^ℯ], [ℯ^pi])
1919

2020
Before v0.1 this function used to be called `stack`, but that name is now exported by Base (from Julia 1.9).
2121
Like this package, `Base.stack` makes an array with `size(result) = (size(inner)..., size(outer)...)`.
22-
It always returns a new dense array, not a lazy container.
22+
However, it always returns a new dense array, not a lazy container.
2323
And instead of two vectors (in the above example) it would want a tuple `stack(([pi^ℯ], [ℯ^pi]))`.
2424

2525
Generators such as `lazystack([i,2i] for i in 1:5)` and arrays of mixed eltype like `lazystack([1,2], [3.0, 4.0], [5im, 6im])` used to be be handled here, making a dense array, but are now simply passed through to `Base.stack`.
2626

27-
When the individual slices aren't backed by an `Array`, as for instance with `CuArray`s on a GPU, then again `Base.stack` is called.
27+
When the individual slices aren't backed by an `Array`, as for instance with `CuArray`s on a GPU, then again `Base.stack` is called.
2828
This should make one big `CuArray`, since scalar indexing of individual slices won't work well.
2929

3030
### Ragged stack
@@ -59,7 +59,7 @@ Besides which, there are several other ways to achieve similar things:
5959

6060
* For an array of arrays, you can also use [`JuliennedArrays.Align`](https://bramtayl.github.io/JuliennedArrays.jl/latest/#JuliennedArrays.Align). This requires (or enables) you to specify which dimensions of the output belong to the sub-arrays, instead of writing `PermutedDimsArray(stack(...), ...)`.
6161
* There is also [`RecursiveArrayTools.VectorOfArray`](https://github.com/JuliaDiffEq/RecursiveArrayTools.jl#vectorofarray) which as its name hints only allows a one-dimensional container. (And unlike the package name, nothing is recursive.) Linear indexing retreives a slice, not an element, which is sometimes surprising.
62-
* For a tuple of arrays, [`LazyArrays.Hcat`](https://github.com/JuliaArrays/LazyArrays.jl#concatenation) is at present faster to index than `stack`, but doesn't allow arbitrary dimensions.
62+
* For a tuple of arrays, [`LazyArrays.Hcat`](https://github.com/JuliaArrays/LazyArrays.jl#concatenation) is at present faster to index than `lazystack`, but doesn't allow arbitrary dimensions.
6363

6464
And a few more:
6565

@@ -80,6 +80,6 @@ The lazy inverse:
8080

8181
Eager:
8282

83-
* After writing this I learned of [JuliaLang#31644](https://github.com/JuliaLang/julia/pull/31644) which extends `reduce(hcat,...)` to work on generators.
83+
* After writing this I learned of [JuliaLang#31644](https://github.com/JuliaLang/julia/pull/31644) which extends `reduce(hcat,...)` to work on generators. (Not merged yet.)
8484

85-
* Later, [JuliaLang#43334](https://github.com/JuliaLang/julia/pull/43334) has added a better version of this package's `stack_iter` method to Base.
85+
* Later, [JuliaLang#43334](https://github.com/JuliaLang/julia/pull/43334) has added a better version of this package's `stack_iter` method to Base. (Available in Julia 1.9, or in [Compat.jl](https://github.com/JuliaLang/Compat.jl).)

0 commit comments

Comments
 (0)