StructArrays.jl
StructArrays.jl copied to clipboard
Juno proper Base.show for StructArrays
I want StructArrays to be shown like Arrays, but overloading this doesn't help:
Base.show(io, x::StructArray{T,T1,T2,T3}) where {T, T1,T2,T3} = Base.show(io, Array(x))
You may try variants of this
julia> Base.show(io::IO, ::MIME{Symbol("text/plain")}, x::StructArray) = show(io, Array(x))
Is there a way to make Juno show StructArrays like Arrays? I need it for exploring data inside the workspace. This issue was meant for Juno mainly.
I tried this but it does not work:
import TreeViews: hastreeview, numberofnodes, treelabel, treenode
Base.show(io::IO, ::MIME"application/prs.juno.inline", x::StructArray) = show(io, Array(x))
hastreeview(::StructArray) = true
numberofnodes(x::StructArray) = length(Array(x))