On Tue, Oct 20, 2015 at 9:03 PM, Luke Stagner <[email protected]> wrote: > Sorry to dredge up this issue again but was there any reason for the return > type of linspace to be LinSpace instead of FloatRange. They are seemingly > indistinguishable.
Not sure if this si **the** reason but you can't get linspace(0, 0, 100) with FloatRange. > > > On Friday, October 9, 2015 at 3:31:31 AM UTC-7, Stefan Karpinski wrote: >> >> It's amazing how often the problem is the way something is printed. >> >> On Fri, Oct 9, 2015 at 8:26 AM, Art Kuo <[email protected]> wrote: >>> >>> Oh, clearly I did not understand show(). I've ported the changes to >>> writemime instead, and as a bonus figured out how to automatically format >>> for screen width (using Base.print_matrix_row). >>> >>> Just to recap: There is little or no problem with linspace or range being >>> an object rather than array as far as execution goes. The only issue seems >>> to be "unexpected" output at the REPL, where a user probably just wants to >>> check what the range looks like, not its definition. Solution is to alter >>> the REPL display to do that and provide the type information so the user >>> doesn't think it's an array. The original show() behavior is retained, you >>> can also dump() to see details of the range. I plan to submit a pull >>> request. >>> >>> On Wednesday, October 7, 2015 at 10:55:05 PM UTC-4, Steven G. Johnson >>> wrote: >>>> >>>> Note, however, that this "display" output should probably be a method of >>>> writemime(io::IO, ::MIME"text/plain", x). The show(io, x) for ranges >>>> should >>>> continue to be the compact output. >> >> >
