Skip to content

Commit 9299244

Browse files
author
Chris Foster
committed
Fix AxisArray type pretty printing with Base.summary
Base now uses the io-based version of summary, so all axis array type summary info was broken in 1.0.
1 parent 365496c commit 9299244

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/core.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ dropax(ax) = ()
476476
# A simple display method to include axis information. It might be nice to
477477
# eventually display the axis labels alongside the data array, but that is
478478
# much more difficult.
479-
function summaryio(io::IO, A::AxisArray)
479+
function Base.summary(io::IO, A::AxisArray)
480480
_summary(io, A)
481481
for (name, val) in zip(axisnames(A), axisvalues(A))
482482
print(io, " :$name, ")
@@ -487,12 +487,6 @@ function summaryio(io::IO, A::AxisArray)
487487
end
488488
_summary(io, A::AxisArray{T,N}) where {T,N} = println(io, "$N-dimensional AxisArray{$T,$N,...} with axes:")
489489

490-
function Base.summary(A::AxisArray)
491-
io = IOBuffer()
492-
summaryio(io, A)
493-
String(take!(io))
494-
end
495-
496490
# Custom methods specific to AxisArrays
497491
"""
498492
axisvalues(A::AxisArray) -> (AbstractVector...)

0 commit comments

Comments
 (0)