Skip to content

Commit

Permalink
fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch committed Sep 26, 2023
1 parent 0cff2cd commit ceebd6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/LinearMaps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,12 @@ with either `A` or `B`.
## Examples
```jldoctest; setup=(using LinearAlgebra, LinearMaps)
julia> A=LinearMap([1.0 2.0; 3.0 4.0]); B=ones(2); Y = similar(B); mul!(Y, A, B);
julia> Y
julia> A = LinearMap([1.0 2.0; 3.0 4.0]); B = ones(2); Y = similar(B); mul!(Y, A, B)
2-element Vector{Float64}:
3.0
7.0
julia> A=LinearMap([1.0 2.0; 3.0 4.0]); B=ones(4,4); Y = similar(B); mul!(Y, A, B);
julia> Y
julia> A = LinearMap([1.0 2.0; 3.0 4.0]); B = ones(2,2); Y = similar(B); mul!(Y, A, B)
2×2 Matrix{Float64}:
3.0 3.0
7.0 7.0
Expand Down
2 changes: 1 addition & 1 deletion src/kronecker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ julia> E = spdiagm(-1 => trues(1)); D = E + E' - 2I;
julia> Δ = kron(D, J) + kron(J, D); # discrete 2D-Laplace operator
julia> Matrix(Δ)
4×4 Array{Int64,2}:
4×4 Matrix{Int64}:
-4 1 1 0
1 -4 0 1
1 0 -4 1
Expand Down

0 comments on commit ceebd6b

Please sign in to comment.