Skip to content

Commit e0cafea

Browse files
committed
Fix doctest
1 parent 44bf7b5 commit e0cafea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/src/dimension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ given `PeriodicGraph`:
3939
julia> function extract_1D_components(g::PeriodicGraph{D}) where D
4040
d = dimensionality(g)
4141
components1D = get(d, 1, Vector{Int}[])
42-
return [PeriodicGraph1D(g[l]) for l in components1D]
42+
return [PeriodicGraph1D(g[l[1]]) for l in components1D]
4343
end
4444
extract_1D_components (generic function with 1 method)
4545
```

src/algorithms/dimensionality.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ julia> subgraph # the subgraph consists in only the two relevant two vertices
405405
PeriodicGraph2D(2, PeriodicEdge2D[(1, 2, (0,0)), (1, 2, (1,0))])
406406
407407
julia> mat # the new cell is twice as large as the initial one
408-
2×2 SMatrix{2, 2, $Int, 4} with indices SOneTo(2)×SOneTo(2):
408+
2×2 $SMatrix{2, 2, $Int, 4} with indices SOneTo(2)×SOneTo(2):
409409
2 0
410410
0 1
411411
```

0 commit comments

Comments
 (0)