assuming savetxt does not support it,
I modified a bit of code I had to do what I think you need ONLY works
for a 1D array and wrapped it into a function that writes in properly
formatted columns. I didn't really test it other than what is there. I
"dressed" it like savetxt but the glaring diff
On 06.12.2012, at 12:40AM, Mark Bakker wrote:
> I guess I wasn't explicit enough.
> Say I have an array with 100 numbers and I want to write it to a file
> with 6 numbers on each line (and hence, only 4 on the last line).
> Can I use savetxt to do that?
> What other easy tool does numpy have to do
I guess I wasn't explicit enough.
Say I have an array with 100 numbers and I want to write it to a file
with 6 numbers on each line (and hence, only 4 on the last line).
Can I use savetxt to do that?
What other easy tool does numpy have to do that?
Thanks,
Mark
On 5. des. 2012, at 22:35, Mark Bakk
On 5. des. 2012, at 22:35, Mark Bakker wrote:
> Hello List,
>
> I want to write a large array to file, and each line can only be 80
> characters long.
> Can I use savetxt to do that? Where would I specify the maximum line length?
If you specify the format, %10.3f for instance, you will know the
Hello List,
I want to write a large array to file, and each line can only be 80
characters long.
Can I use savetxt to do that? Where would I specify the maximum line length?
Or is there a better way to do this?
Thanks,
Mark
___
NumPy-Discussion mailing