Skip to content

Commit

Permalink
Fixed errant return values, generic first element lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
BioTurboNick committed Apr 13, 2020
1 parent 981aa13 commit 80ce4bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/arrayshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function show_nd(io::IO, a::AbstractArray, print_matrix::Function, show_full::Bo
nd = ndims(a)-2
show_full || print(io, "[")
Is = CartesianIndices(tailinds)
lastidxs = Is[1].I
lastidxs = first(Is).I
for I in Is
idxs = I.I
if limit
Expand Down Expand Up @@ -320,6 +320,7 @@ function show_nd(io::IO, a::AbstractArray, print_matrix::Function, show_full::Bo
lastidxs = idxs
end
show_full || print(io, "]")
()
end

# print_array: main helper functions for show(io, text/plain, array)
Expand Down Expand Up @@ -423,6 +424,7 @@ function _show_nonempty(io::IO, X::AbstractMatrix, prefix::String, drop_brackets
last(rr) != nr && rdots && print(io, "\u2026 ; ")
end
drop_brackets || print(io, "]")
()
end


Expand Down

0 comments on commit 80ce4bf

Please sign in to comment.