Skip to content

Commit d947bcd

Browse files
Update docstring for ldiv!
1 parent 97ee7d2 commit d947bcd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/LinearAlgebra.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,13 @@ control over the factorization of `A`.
392392
393393
# Examples
394394
```jldoctest
395-
julia> A, B = [1 2.2 4; 3.1 0.2 3; 4 1 2], [1, 2.5, 3];
395+
julia> A = [1 2.2 4; 3.1 0.2 3; 4 1 2];
396+
397+
julia> B = [1, 2.5, 3];
396398
397399
julia> Y = copy(B);
398400
399-
julia> ldiv!(Y, qr(A), B); # also try qr!(A) for the 2nd arg
401+
julia> ldiv!(Y, qr(A), B); # you may also try qr!(A) to further reduce allocation
400402
401403
julia> Y ≈ A \\ B
402404
true
@@ -422,11 +424,13 @@ control over the factorization of `A`.
422424
423425
# Examples
424426
```jldoctest
425-
julia> A, B = [1 2.2 4; 3.1 0.2 3; 4 1 2], [1, 2.5, 3];
427+
julia> A = [1 2.2 4; 3.1 0.2 3; 4 1 2];
428+
429+
julia> B = [1, 2.5, 3];
426430
427431
julia> B0 = copy(B);
428432
429-
julia> ldiv!(lu(A), B); # also try lu!(A) for the 1st arg
433+
julia> ldiv!(lu(A), B); # you may also try lu!(A) to further reduce allocation
430434
431435
julia> B ≈ A \\ B0
432436
true

0 commit comments

Comments
 (0)