Re: Numpy array to gzip file

2008-06-11 Thread Robert Kern
Sean Davis wrote: I have a set of numpy arrays which I would like to save to a gzip file. Here is an example without gzip: b=numpy.ones(100,dtype=numpy.uint8) a=numpy.zeros(100,dtype=numpy.uint8) fd = file('test.dat','wb') a.tofile(fd) b.tofile(fd) fd.close() This works fine. However,

Re: Numpy array to gzip file

2008-06-11 Thread Sean Davis
On Jun 11, 12:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jun 11, 9:17 am, Sean Davis <[EMAIL PROTECTED]> wrote: > > > > > I have a set of numpy arrays which I would like to save to a gzip > > file. Here is an example without gzip: > > > b=numpy.ones(100,dtype=numpy.uint8) > > a

Re: Numpy array to gzip file

2008-06-11 Thread [EMAIL PROTECTED]
On Jun 11, 9:17 am, Sean Davis <[EMAIL PROTECTED]> wrote: > I have a set of numpy arrays which I would like to save to a gzip > file. Here is an example without gzip: > > b=numpy.ones(100,dtype=numpy.uint8) > a=numpy.zeros(100,dtype=numpy.uint8) > fd = file('test.dat','wb') > a.tofile(fd)

Numpy array to gzip file

2008-06-11 Thread Sean Davis
I have a set of numpy arrays which I would like to save to a gzip file. Here is an example without gzip: b=numpy.ones(100,dtype=numpy.uint8) a=numpy.zeros(100,dtype=numpy.uint8) fd = file('test.dat','wb') a.tofile(fd) b.tofile(fd) fd.close() This works fine. However, this does not: fd