Skip to content

repr([1 1 1]) to be rather "[1 1 1]" than "1x3 Array{Int64,2}:\n 1 1 1" #5676

Closed
mschauer opened this Issue Feb 4, 2014 · 7 comments

4 participants

@mschauer
mschauer commented Feb 4, 2014

This would be in better alignment with the general behavior of show, repr, e.g.

julia> repr([1, 1, 1])
"[1,1,1]"

Similar one could argue, that repr([1 1; 1 1]) should be "[1 1; 1 1]" or maybe better

[1 1
 1 1]
@toivoh
The Julia Language member
@mschauer

repr uses showall, not show, that was recently fixed in the docs

@JeffBezanson JeffBezanson added this to the 0.3 milestone Feb 18, 2014
@JeffBezanson
The Julia Language member

Yes, it seems like the current repl format should be used by writemime and not show.

@JeffBezanson
The Julia Language member

How do people feel about including the type, e.g. Int64[1 1 1]?

@StefanKarpinski
The Julia Language member

I'm cool with that.

@mschauer

In general annotating the type in this way is a nice idea, maybe one can skip the type annotation for Int and Float64 because it is understood that [1,1] are Int's and [1.5,1.2] are Float64's.

@JeffBezanson
The Julia Language member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.