@@ -94,14 +94,10 @@ Typically created by `Fill` or `Zeros` or `Ones`
9494
9595```jldoctest
9696julia> Fill(7, (2,3))
97- 2×3 Fill{Int64,2,Tuple{Base.OneTo{Int64},Base.OneTo{Int64}}}:
98- 7 7 7
99- 7 7 7
100-
101- julia> Fill{Float64, 1, Tuple{UnitRange{Int64}}}(7., (1:2,))
102- 2-element Fill{Float64,1,Tuple{UnitRange{Int64}}} with indices 1:2:
103- 7.0
104- 7.0
97+ 2×3 Fill{Int64}, with entries equal to 7
98+
99+ julia> Fill{Float64, 1, Tuple{UnitRange{Int64}}}(7.0, (1:2,))
100+ 2-element Fill{Float64, 1, Tuple{UnitRange{Int64}}} with indices 1:2, with entries equal to 7.0
105101```
106102"""
107103struct Fill{T, N, Axes} <: AbstractFill{T, N, Axes}
@@ -716,12 +712,9 @@ function Base.show(io::IO, ::MIME"text/plain", x::Union{Eye, AbstractFill})
716712 return show (io, x)
717713 end
718714 summary (io, x)
719- if x isa Union{AbstractZeros, AbstractOnes, Eye}
720- # then no need to print entries
721- elseif length (x) > 1
722- print (io, " , with entries equal to " , getindex_value (x))
723- else
724- print (io, " , with entry equal to " , getindex_value (x))
715+ if ! (x isa Union{AbstractZeros, AbstractOnes, Eye})
716+ print (io, " , with " , length (x) > 1 ? " entries" : " entry" , " equal to " )
717+ show (io, getindex_value (x))
725718 end
726719end
727720
0 commit comments