Skip to content

Commit e1024d3

Browse files
committed
Fix up doctests
1 parent 577e2a8 commit e1024d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/src/indexing_behavior.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ ComponentVector{Int64}(b = [4, 1], c = (a = 2, b = [6, 30]))
9292
But what if our range doesn't capture a full component? We can see below that using `KeepIndex` on the first five elements returns a `ComponentVector` with those elements but only the `a` and `b` names, since the `c` component wasn't fully captured.
9393
```jldoctest indexing-label-retain
9494
julia> ca[KeepIndex(1:5)]
95-
5-element ComponentVector{Int64} with axis Axis(a = 1, b = 2:3):
95+
5-element ComponentVector{Int64} with axis Axis(a = 1, b = ViewAxis(2:3, Shaped1DAxis((2,)))):
9696
5
9797
4
9898
1

docs/src/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ComponentVector{Int64}(a = 11, b = 2, c = 3, new = 42)
4444
Higher dimensional `ComponentArray`s can be created too, but it's a little messy at the moment. The nice thing for modeling is that dimension expansion through broadcasted operations can create higher-dimensional `ComponentArray`s automatically, so Jacobian cache arrays that are created internally with `false .* x .* x'` will be `ComponentArray`s with proper axes. Check out the [ODE with Jacobian](https://github.com/SciML/ComponentArrays.jl/blob/master/examples/ODE_jac_example.jl) example in the examples folder to see how this looks in practice.
4545
```jldoctest quickstart
4646
julia> x2 = x .* x'
47-
7×7 ComponentMatrix{Float64} with axes Axis(a = 1, b = 2:4, c = ViewAxis(5:7, Axis(a = 1, b = 2:3))) × Axis(a = 1, b = 2:4, c = ViewAxis(5:7, Axis(a = 1, b = 2:3)))
47+
7×7 ComponentMatrix{Float64} with axes Axis(a = 1, b = ViewAxis(2:4, Shaped1DAxis((3,))), c = ViewAxis(5:7, Axis(a = 1, b = ViewAxis(2:3, Shaped1DAxis((2,)))))) × Axis(a = 1, b = ViewAxis(2:4, Shaped1DAxis((3,))), c = ViewAxis(5:7, Axis(a = 1, b = ViewAxis(2:3, Shaped1DAxis((2,))))))
4848
1.0 2.0 1.0 4.0 400.0 1.0 2.0
4949
2.0 4.0 2.0 8.0 800.0 2.0 4.0
5050
1.0 2.0 1.0 4.0 400.0 1.0 2.0
@@ -54,7 +54,7 @@ julia> x2 = x .* x'
5454
2.0 4.0 2.0 8.0 800.0 2.0 4.0
5555
5656
julia> x2[:c,:c]
57-
3×3 ComponentMatrix{Float64} with axes Axis(a = 1, b = 2:3) × Axis(a = 1, b = 2:3)
57+
3×3 ComponentMatrix{Float64} with axes Axis(a = 1, b = ViewAxis(2:3, Shaped1DAxis((2,)))) × Axis(a = 1, b = ViewAxis(2:3, Shaped1DAxis((2,))))
5858
160000.0 400.0 800.0
5959
400.0 1.0 2.0
6060
800.0 2.0 4.0
@@ -66,7 +66,7 @@ julia> x2[:a,:c]
6666
ComponentVector{Float64}(a = 400.0, b = [1.0, 2.0])
6767
6868
julia> x2[:b,:c]
69-
3×3 ComponentMatrix{Float64} with axes FlatAxis() × Axis(a = 1, b = 2:3)
69+
3×3 ComponentMatrix{Float64} with axes Shaped1DAxis((3,)) × Axis(a = 1, b = ViewAxis(2:3, Shaped1DAxis((2,))))
7070
800.0 2.0 4.0
7171
400.0 1.0 2.0
7272
1600.0 4.0 8.0

0 commit comments

Comments
 (0)