From f137fb2234f66eb2f020954e8c50172f7553508c Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 7 Sep 2019 12:05:19 +0200 Subject: [PATCH] Change example for sparse arrays --- stdlib/SparseArrays/docs/src/index.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stdlib/SparseArrays/docs/src/index.md b/stdlib/SparseArrays/docs/src/index.md index d6ce20e059ed3..72347663eb034 100644 --- a/stdlib/SparseArrays/docs/src/index.md +++ b/stdlib/SparseArrays/docs/src/index.md @@ -50,15 +50,17 @@ matrix. [`dropzeros`](@ref), and the in-place [`dropzeros!`](@ref), can be used remove stored zeros from the sparse matrix. ```jldoctest -julia> A = sparse([1, 2, 3], [1, 2, 3], [0, 2, 0]) -3×3 SparseMatrixCSC{Int64,Int64} with 3 stored entries: +julia> A = sparse([1, 1, 2, 3], [1, 3, 2, 3], [0, 1, 2, 0]) +3×3 SparseMatrixCSC{Int64,Int64} with 4 stored entries: [1, 1] = 0 [2, 2] = 2 + [1, 3] = 1 [3, 3] = 0 julia> dropzeros(A) -3×3 SparseMatrixCSC{Int64,Int64} with 1 stored entry: +3×3 SparseMatrixCSC{Int64,Int64} with 2 stored entries: [2, 2] = 2 + [1, 3] = 1 ``` ## Sparse Vector Storage