Writing array to file with format

What’s wrong with a loop?

for i = axes(A, 1)
    for j = axes(A, 2)
        @printf(io, "%9.5f", A[i,j])
    end
    println(io)
end

write in Julia is for raw binary output, not for text representations of numeric data.

4 Likes