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

showarg error for 0-dimensional array #35

Closed
fredrikekre opened this issue Dec 4, 2017 · 0 comments
Closed

showarg error for 0-dimensional array #35

fredrikekre opened this issue Dec 4, 2017 · 0 comments

Comments

@fredrikekre
Copy link
Member

julia> a = OffsetArray(reshape([1]))
0-dimensional OffsetArray(::Array{Int64,0}, Error showing value of type OffsetArray{Int64,0,Array{Int64,0}}:
ERROR: MethodError: no method matching printindices(::IOContext{Base.Terminals.TTYTerminal})
Closest candidates are:
  printindices(::IO, ::Any) at /home/fredrik/.julia/v0.7/OffsetArrays/src/OffsetArrays.jl:242
  printindices(::IO, ::Any, ::Any...) at /home/fredrik/.julia/v0.7/OffsetArrays/src/OffsetArrays.jl:240
Stacktrace:
 [1] showarg(::IOContext{Base.Terminals.TTYTerminal}, ::OffsetArray{Int64,0,Array{Int64,0}}, ::Bool) at /home/fredrik/.julia/v0.7/OffsetArrays/src/OffsetArrays.jl:236
 [2] #showarray#319(::Bool, ::Function, ::IOContext{Base.Terminals.TTYTerminal}, ::OffsetArray{Int64,0,Array{Int64,0}}, ::Bool) at ./show.jl:2063
 [3] show(::IOContext{Base.Terminals.TTYTerminal}, ::MIME{Symbol("text/plain")}, ::OffsetArray{Int64,0,Array{Int64,0}}) at ./replutil.jl:139
 [4] display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::MIME{Symbol("text/plain")}, ::OffsetArray{Int64,0,Array{Int64,0}}) at ./repl/REPL.jl:125
 [5] display(::Base.REPL.REPLDisplay{Base.REPL.LineEditREPL}, ::OffsetArray{Int64,0,Array{Int64,0}}) at ./repl/REPL.jl:128
 [6] display(::OffsetArray{Int64,0,Array{Int64,0}}) at ./multimedia.jl:283
 [7] (::getfield(Base, Symbol("#inner#4")){NamedTuple{(),Tuple{}},typeof(display),Tuple{OffsetArray{Int64,0,Array{Int64,0}}}})() at ./essentials.jl:649
 [8] print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./repl/REPL.jl:146
 [9] print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./repl/REPL.jl:132
 [10] (::getfield(Base.REPL, Symbol("#do_respond#17")){Bool,getfield(Base.REPL, Symbol("##27#37")){Base.REPL.LineEditREPL,Base.REPL.REPLHistoryProvider},Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at ./repl/REPL.jl:676
 [11] top-level scope

Error is here:

printindices(io, indices(a)...)
because indices(a) === ().

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

1 participant