Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make print_matrix O(1) again #23681

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1617,9 +1617,8 @@ function print_matrix(io::IO, X::AbstractVecOrMat,
postsp = ""
@assert strwidth(hdots) == strwidth(ddots)
sepsize = length(sep)
inds1, inds2 = indices(X,1), indices(X,2)
m, n = length(inds1), length(inds2)
rowsA, colsA = collect(inds1), collect(inds2)
rowsA, colsA = indices(X,1), indices(X,2)
m, n = length(rowsA), length(colsA)
# To figure out alignments, only need to look at as many rows as could
# fit down screen. If screen has at least as many rows as A, look at A.
# If not, then we only need to look at the first and last chunks of A,
Expand Down