Skip to content

Commit 488431f

Browse files
committed
Fix docs
1 parent ed9da5c commit 488431f

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

docs/make.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ using BlockSparseArrays: BlockSparseArrays
22
using Documenter: Documenter, DocMeta, deploydocs, makedocs
33

44
DocMeta.setdocmeta!(
5-
BlockSparseArrays, :DocTestSetup, :(using BlockSparseArrays); recursive=true
5+
BlockSparseArrays,
6+
:DocTestSetup,
7+
quote
8+
using BlockSparseArrays
9+
using LinearAlgebra: Diagonal
10+
end;
11+
recursive=true,
612
)
713

814
include("make_index.jl")
@@ -16,7 +22,7 @@ makedocs(;
1622
edit_link="main",
1723
assets=String[],
1824
),
19-
pages=["Home" => "index.md"],
25+
pages=["Home" => "index.md", "Library" => "library.md"],
2026
)
2127

2228
deploydocs(;

docs/src/library.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Library
2+
3+
```@autodocs
4+
Modules = [BlockSparseArrays]
5+
```

src/factorizations/svd.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ julia> A = [1. 0. 0. 0. 2.; 0. 0. 3. 0. 0.; 0. 0. 0. 0. 0.; 0. 2. 0. 0. 0.]
3333
0.0 0.0 0.0 0.0 0.0
3434
0.0 2.0 0.0 0.0 0.0
3535
36-
julia> F = svd(A)
37-
SVD{Float64, Float64, Matrix{Float64}, Vector{Float64}}
36+
julia> F = BlockSparseArrays.svd(A)
37+
BlockSparseArrays.SVD{Float64, Float64, Matrix{Float64}, Vector{Float64}, Matrix{Float64}}
3838
U factor:
3939
4×4 Matrix{Float64}:
40-
0.0 1.0 0.0 0.0
41-
1.0 0.0 0.0 0.0
42-
0.0 0.0 0.0 1.0
43-
0.0 0.0 -1.0 0.0
40+
0.0 1.0 0.0 0.0
41+
1.0 0.0 0.0 0.0
42+
0.0 0.0 0.0 -1.0
43+
0.0 0.0 1.0 0.0
4444
singular values:
4545
4-element Vector{Float64}:
4646
3.0
@@ -49,10 +49,10 @@ singular values:
4949
0.0
5050
Vt factor:
5151
4×5 Matrix{Float64}:
52-
-0.0 0.0 1.0 -0.0 0.0
53-
0.447214 0.0 0.0 0.0 0.894427
54-
0.0 -1.0 0.0 0.0 0.0
55-
0.0 0.0 0.0 1.0 0.0
52+
-0.0 0.0 1.0 -0.0 0.0
53+
0.447214 0.0 0.0 0.0 0.894427
54+
-0.0 1.0 0.0 -0.0 0.0
55+
0.0 0.0 0.0 1.0 0.0
5656
5757
julia> F.U * Diagonal(F.S) * F.Vt
5858
4×5 Matrix{Float64}:
@@ -181,7 +181,7 @@ number of singular values.
181181
```jldoctest
182182
julia> A = rand(4,3);
183183
184-
julia> F = svd(A); # Store the Factorization Object
184+
julia> F = BlockSparseArrays.svd(A); # Store the Factorization Object
185185
186186
julia> A ≈ F.U * Diagonal(F.S) * F.Vt
187187
true
@@ -191,7 +191,7 @@ julia> U, S, V = F; # destructuring via iteration
191191
julia> A ≈ U * Diagonal(S) * V'
192192
true
193193
194-
julia> Uonly, = svd(A); # Store U only
194+
julia> Uonly, = BlockSparseArrays.svd(A); # Store U only
195195
196196
julia> Uonly == U
197197
true

0 commit comments

Comments
 (0)