Skip to content

Commit e2de7bf

Browse files
add a quick example
1 parent 49aa00e commit e2de7bf

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,30 @@
55
[![Build status](https://badge.buildkite.com/5f39777d009ce94ef1dcf2a4881c68b9fbcaf6f69f1d8b8df2.svg)](https://buildkite.com/julialang/recursivearraytools-dot-jl)
66

77
RecursiveArrayTools.jl is a set of tools for dealing with recursive arrays like
8-
arrays of arrays.
8+
arrays of arrays.
9+
10+
## Tutorials and Documentation
11+
12+
For information on using the package,
13+
[see the stable documentation](https://recursivearraytools.sciml.ai/stable/). Use the
14+
[in-development documentation](https://recursivearraytools.sciml.ai/dev/) for the version of
15+
the documentation, which contains the unreleased features.
16+
17+
## Example
18+
19+
```julia
20+
using RecursiveArrayTools
21+
a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
22+
b = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
23+
vA = VectorOfArray(a)
24+
vB = VectorOfArray(b)
25+
26+
vA .+ vB # Now all standard array stuff works!
27+
28+
a = (rand(5),rand(5))
29+
b = (rand(5),rand(5))
30+
pA = ArrayPartition(a)
31+
pB = ArrayPartition(b)
32+
33+
pA .+ pB # Now all standard array stuff works!
34+
```

0 commit comments

Comments
 (0)