@@ -299,21 +299,19 @@ indexlength(r::AbstractRange) = length(r)
299299indexlength (i:: Integer ) = i
300300indexlength (i:: Colon ) = Colon ()
301301
302+ # These functions keep the summary compact
303+ function Base. inds2string (inds:: Tuple {Vararg{Union{IdOffsetRange, IdentityUnitRange{<: IdOffsetRange }}}})
304+ Base. inds2string (map (UnitRange, inds))
305+ end
306+ Base. showindices (io:: IO , ind1:: IdOffsetRange , inds:: IdOffsetRange... ) = Base. showindices (io, map (UnitRange, (ind1, inds... ))... )
307+
302308function Base. showarg (io:: IO , a:: OffsetArray , toplevel)
303309 print (io, " OffsetArray(" )
304310 Base. showarg (io, parent (a), false )
305- if ndims (a) > 0
306- print (io, " , " )
307- printindices (io, axes (a)... )
308- end
311+ Base. showindices (io, axes (a)... )
309312 print (io, ' )' )
310313 toplevel && print (io, " with eltype " , eltype (a))
311314end
312- printindices (io:: IO , ind1, inds... ) =
313- (print (io, _unslice (ind1), " , " ); printindices (io, inds... ))
314- printindices (io:: IO , ind1) = print (io, _unslice (ind1))
315- _unslice (x) = x
316- _unslice (x:: IdentityUnitRange ) = x. indices
317315
318316function Base. replace_in_print_matrix (A:: OffsetArray{<:Any,2} , i:: Integer , j:: Integer , s:: AbstractString )
319317 J = map (parentindex, axes (A), (i,j))
0 commit comments