Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Pretty) print arrays with more than 3 dimensions #32

Closed
compleconomics opened this issue Jul 27, 2016 · 1 comment
Closed

(Pretty) print arrays with more than 3 dimensions #32

compleconomics opened this issue Jul 27, 2016 · 1 comment
Assignees

Comments

@compleconomics
Copy link

This probably relates to issue #27 of last month.

This
NamedArray(rand(Int16,2,4,2))
now looks fantastic in pretty printing.

However your fix may have broken the general (non-pretty) printing of >3-dimensional-arrays. So this
NamedArray(rand(Int16,2,4,2,4))
could still be assigned to a variable and sliced within 3 array dimensions, but any printing of more than 3 dimensions is not possible anymore at least on my system.

Specifically I get this error message:

NamedArray(rand(Int16,2,4,2,4))
2x4x2x4 Named Array{Int16,4}
[:, :, C=1, D=1] =
Error showing value of type NamedArrays.NamedArray{Int16,4,Array{Int16,4},Tuple{Dict{ASCIIString,Int64},Dict{ASCIIString,Int64},Dict{ASCIIString,Int64},Dict{ASCIIString,Int64}}}:
ERROR: MethodError: show has no method matching show(::Base.Terminals.TTYTerminal, ::Array{Int16,2}, ::Int64)
Closest candidates are:
show(::IO, ::NamedArrays.NamedArray{T,2,AT,DT}, ::Int64)
show(::IO, ::NamedArrays.NamedArray{T,1,AT,DT}, ::Int64)
show(::IO, ::AbstractArray{T,N})
...
in show at /Users/lh/.julia/v0.4/NamedArrays/src/show.jl:44
in writemime at /Users/lh/.julia/v0.4/NamedArrays/src/show.jl:21
in display at REPL.jl:114
in display at REPL.jl:117
[inlined code] from multimedia.jl:151
in display at multimedia.jl:163
in print_response at REPL.jl:134
in print_response at REPL.jl:121
in anonymous at REPL.jl:624
in run_interface at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib
in run_frontend at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib
in run_repl at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib
in _start at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

@davidavdav
Copy link
Owner

This looks not good. I will have a look at it some time later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants