[julia-users] writedlm deletes leading zeros

2014-12-17 Thread Roman Nelson
When writing a matrix of type Any into a text file with writedlm/wrirecsv leading zeros of floats are removed in the process. Julia version 0.3.3 under win7. On screen: Some text 0.1234 In file: Some text .1234 This is really strange and I can't figure out why this is happening. I have tried

[julia-users] writedlm deletes leading zeros

2014-12-17 Thread Ivar Nesje
Can you post the exact code you use? There are many ways to print numbers in Julia, and they give different representations.

[julia-users] writedlm deletes leading zeros

2014-12-17 Thread Roman Nelson
The code is standard: writecsv(C:\\Data\\test.csv, output) writedlm has the same issue. output is a matrix of type Any with text and numeric entries.

Re: [julia-users] writedlm deletes leading zeros

2014-12-17 Thread Jameson Nash
https://github.com/JuliaLang/julia/blob/59b6080e0a75dbe88b4890189ef02f2dbf4164ea/base/datafmt.jl#L489 writecsv dispatches to print_shortest for the numerical formatting: io=IOBuffer(); julia print_shortest(io,0.1234); julia takebuf_string(io) .1234 i'm not sure i would necessarily classify