Thanks @rfourquet for taking a look on this.
I am not sure, but as far as I can trace this down (for the example above), I think the problem is related to this method of show
. There, :compact => true
is set, perhaps overwriting what may be defined by the context of io
. Is this correct?
As a side remark, the hack proposed here actually works:
julia> Base.show(io::IO, x::Union{Float64,Float32}) = Base.Grisu._show(io, x, Base.Grisu.SHORTEST, 0, true, false)
julia> a = MyType{Float64}(randn(5))
MyType{Float64}([-1.449833577704765, -0.10839395960990496, 3.141203529351768, 0.7843448324558726, -1.3296269838447883])