Skip to content

Commit

Permalink
Fix doctests of unexported functions
Browse files Browse the repository at this point in the history
Fix doctests in the docstrings of LinearAlgebra.isbanded, 
LinearAlgebra.promote_leaf_eltypes and SparseArrays.dropstored!. All the 
functions are unexported and not included in the manual.

They are currently not being doctested, but will be with a future 
version of Documenter.
  • Loading branch information
mortenpi committed Jun 26, 2019
1 parent 0945172 commit 7179b96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions stdlib/LinearAlgebra/src/generic.jl
Expand Up @@ -1183,21 +1183,21 @@ julia> a = [1 2; 2 -1]
1 2
2 -1
julia> isbanded(a, 0, 0)
julia> LinearAlgebra.isbanded(a, 0, 0)
false
julia> isbanded(a, -1, 1)
julia> LinearAlgebra.isbanded(a, -1, 1)
true
julia> b = [1 0; -im -1] # lower bidiagonal
2×2 Array{Complex{Int64},2}:
1+0im 0+0im
0-1im -1+0im
julia> isbanded(b, 0, 0)
julia> LinearAlgebra.isbanded(b, 0, 0)
false
julia> isbanded(b, -1, 0)
julia> LinearAlgebra.isbanded(b, -1, 0)
true
```
"""
Expand Down Expand Up @@ -1423,7 +1423,7 @@ julia> a = [[1,2, [3,4]], 5.0, [6im, [7.0, 8.0]]]
5.0
Any[0+6im,[7.0,8.0]]
julia> promote_leaf_eltypes(a)
julia> LinearAlgebra.promote_leaf_eltypes(a)
Complex{Float64}
```
"""
Expand Down
4 changes: 2 additions & 2 deletions stdlib/SparseArrays/src/sparsevector.jl
Expand Up @@ -325,11 +325,11 @@ julia> x = sparsevec([1, 3], [1.0, 2.0])
[1] = 1.0
[3] = 2.0
julia> Base.SparseArrays.dropstored!(x, 3)
julia> SparseArrays.dropstored!(x, 3)
3-element SparseVector{Float64,Int64} with 1 stored entry:
[1] = 1.0
julia> Base.SparseArrays.dropstored!(x, 2)
julia> SparseArrays.dropstored!(x, 2)
3-element SparseVector{Float64,Int64} with 1 stored entry:
[1] = 1.0
```
Expand Down

0 comments on commit 7179b96

Please sign in to comment.