From 27fdfd888c35c978009a37615fa9faa64a939408 Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Wed, 30 Oct 2019 11:19:24 -0400 Subject: [PATCH] Fixed errant return values, generic first element lookup --- base/arrayshow.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/arrayshow.jl b/base/arrayshow.jl index a0fad36f6b801d..9f0c4433f72495 100644 --- a/base/arrayshow.jl +++ b/base/arrayshow.jl @@ -265,7 +265,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 @@ -313,6 +313,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) @@ -414,6 +415,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