Skip to content

Commit

Permalink
sparse: use ndigits instead of alignment for printing [fix JuliaLang#…
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Aug 2, 2012
1 parent b755ec4 commit 5c9a11e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extras/sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function show(io, S::SparseMatrixCSC)
println(io, S.m, "x", S.n, " sparse matrix with ", nnz(S), " nonzeros:")

half_screen_rows = div(tty_rows() - 8, 2)
pad = alignment(max(S.m,S.n))[1]
pad = ndigits(max(S.m,S.n))
k = 0
for col = 1:S.n, k = S.colptr[col] : (S.colptr[col+1]-1)
if k < half_screen_rows || k > nnz(S)-half_screen_rows
Expand Down

0 comments on commit 5c9a11e

Please sign in to comment.