Skip to content

Commit

Permalink
fix show
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Jul 29, 2023
1 parent 0e79ea0 commit 3a985c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/array/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function print_name(io::IO, name)
end
end

Base.print_matrix(io::IO, A::AbstractDimArray) = _print_matrix(io, parent(A), lookup(A))
# Base.print_matrix(io::IO, A::AbstractDimArray) = _print_matrix(io, parent(A), lookup(A))
# Labelled matrix printing is modified from AxisKeys.jl, thanks @mcabbot
function _print_matrix(io::IO, A::AbstractArray{<:Any,1}, lookups::Tuple)
h, w = displaysize(io)
Expand All @@ -88,6 +88,7 @@ function _print_matrix(io::IO, A::AbstractArray{<:Any,1}, lookups::Tuple)
Base.print_matrix(io, A_dims)
return nothing
end
_print_matrix(io::IO, A::AbstractDimArray, lookups::Tuple) = _print_matrix(io, parent(A), lookups)
function _print_matrix(io::IO, A::AbstractArray, lookups::Tuple)
lu1, lu2 = lookups
h, w = displaysize(io)
Expand All @@ -107,7 +108,7 @@ function _print_matrix(io::IO, A::AbstractArray, lookups::Tuple)
bottomleft = hcat(map(showblack, parent(lu1)[ibottom]), bottomleft)
end

leftblock = vcat(topleft, bottomleft)
leftblock = vcat(parent(topleft), parent(bottomleft))
rightblock = vcat(A[itop, iright], A[ibottom, iright])
bottomblock = hcat(leftblock, rightblock)

Expand Down

0 comments on commit 3a985c0

Please sign in to comment.