Sometimes a simple text file really does the trick... However, you might
consider saving yourself some future pain by learning some non-text based
storage formats. In the past, I used text files all the time, and they
quickly became limiting, as you've noticed.

I personally like HDF files. There are libraries for these files on all OSs
using many programming languages. Python has at least two: PyTables and
h5py. I've personally used PyTables and find it very user-friendly. Pandas
also has capabilities for interacting with HDF files (via PyTables).

If you are only going to be using Numpy, there are also binary formats such
as .npy, .npz, and memmaps. See `numpy.save`, `numpy.savez`, and
`numpy.memmap`. I don't have much experience here, so I can't say much on
these formats...

Good luck.

Ryan

On Wed, Mar 11, 2015 at 5:15 PM, Benjamin Root <ben.r...@ou.edu> wrote:

> What 3D array? There shouldn't be any 3D arrays. I suspect that x_t is
> only accidentally 3d by having a shape like (N, M, 1) or (1, N, M).
>
> Ben Root
>
> On Wed, Mar 11, 2015 at 5:05 PM, Prahas David Nafissian <
> prahas.mu...@gmail.com> wrote:
>
>> Hello,
>>
>> Solved the write issue.
>>
>> I tried numpy savetxt but it chokes on 3D arrays.
>>
>> So I'm doing this:
>>
>> x_t.tofile('test3.txt',sep=" ",format="%f")
>>
>> Only issue -- no end-of-lines. But I can write a quick
>> Pascal program to fix this...
>>
>> Once again, thanks!
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for all
>> things parallel software development, from weekly thought leadership
>> blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to