On 21/09/2010 18:29, David Huard wrote:
Have you tried
http://code.google.com/p/python-fortranformat/
It's not officially released yet but it's probably worth a try.
Well, I noticed it, bugt the website does say This is a work in
progress, a working version is not yet available!
Andrew
On Sep 21, 2010, at 2:25 PM, Andrew Jaffe wrote:
Hi all,
I've got an ascii file with a relatively complicated structure,
originally written by fortran with the format:
135format(a12,1x,2(f10.5,1x),i3,1x,4(f9.3,1x),4(i2,1x),3x,
1
On Wed, Sep 22, 2010 at 2:04 AM, keekychen.shared
keekychen.sha...@gmail.com wrote:
Dear All,
See below code pls,
import sicpy
import numpy as np
x = np.zeros((2,),dtype=('i4,f4,a10'))
x[:] = [(1,2.,'Hello'),(2,3.,World)]
y = x['f2']
#array(['Hello', 'World'],
dtype='|S10')
A colleague of mine posed the following problem. He wants to search large
files of binary data for sequences.
I thought of using mmap (to avoid reading all data into memory at once) and
then turning this into a numpy array (using buffer=).
But, how to then efficiently find a sequence?
Note
On Wed, Sep 22, 2010 at 11:10 PM, Neal Becker ndbeck...@gmail.com wrote:
A colleague of mine posed the following problem. He wants to search large
files of binary data for sequences.
Is there a reason why you cannot use one of the classic string search
algorithms applied to the bytestream ?
David Cournapeau wrote:
On Wed, Sep 22, 2010 at 11:10 PM, Neal Becker ndbeck...@gmail.com wrote:
A colleague of mine posed the following problem. He wants to search
large files of binary data for sequences.
Is there a reason why you cannot use one of the classic string search
algorithms
On Wed, Sep 22, 2010 at 09:27, josef.p...@gmail.com wrote:
I would like to generate random numbers based on a random seed, for
example what numpy.random does if the seed is not specified. But I
would also like to print out the initial state, so I can replicate the
random numbers.
Can I get
On Wed, Sep 22, 2010 at 09:10, Neal Becker ndbeck...@gmail.com wrote:
A colleague of mine posed the following problem. He wants to search large
files of binary data for sequences.
I thought of using mmap (to avoid reading all data into memory at once) and
then turning this into a numpy array
It seems that lib2to3 does not process the main f2py bootstrap script
that gets autogenerated by f2py's setup.py. The trivial patch below
replaces the print statements with sys.stderr.write() calls. After
that change, f2py works just fine in Python 3.2
Index: numpy/f2py/setup.py
On Wed, Sep 22, 2010 at 11:25 PM, Neal Becker ndbeck...@gmail.com wrote:
David Cournapeau wrote:
On Wed, Sep 22, 2010 at 11:10 PM, Neal Becker ndbeck...@gmail.com wrote:
A colleague of mine posed the following problem. He wants to search
large files of binary data for sequences.
Is there
On Wed, Sep 22, 2010 at 8:35 AM, Lisandro Dalcin dalc...@gmail.com wrote:
It seems that lib2to3 does not process the main f2py bootstrap script
that gets autogenerated by f2py's setup.py. The trivial patch below
replaces the print statements with sys.stderr.write() calls. After
that change,
On 21 September 2010 19:20, Timothy W. Hilton hil...@meteo.psu.edu wrote:
I have an 80x1200x1200 nd.array of floats this_par. I have a
1200x1200 boolean array idx, and an 80-element float array pars. For
each element of idx that is True, I wish to replace the corresponding
80x1x1 slice of
Wayne Watson wrote:
I've considered it, but it's way too time consuming to work out the
details. I spent a week some time ago dealing with a simple test
program, maybe 10 lines of code, trying to get it to work, which I think
I did. I just need to work what I've got.
There is a lot to
Hello Friedrich,
I have read your proposal. You describe issues that I have also
encountered several times.
I believe that your priops approach would be an improvement over the
current overloading of binary operators.
That being said, I think the issue is not so much numpy but rather the
way
Hi everyone
I suspect this is easy but I'm stuck
say I have a 1D array:
t = [10,11,12]
and a 2D array:
id = [[0,1,0]
[0,2,0]
[2,0,2]]
In could in IDL do y = t[id] which would produce:
y = [[10,11,10]
[10,12,10]
[12,10,12]]
i.e. use the indexes in id on the lookup array t.
Is there an easy
On 22 September 2010 16:38, Ross Williamson
rosswilliamson@gmail.com wrote:
Hi everyone
I suspect this is easy but I'm stuck
say I have a 1D array:
t = [10,11,12]
and a 2D array:
id = [[0,1,0]
[0,2,0]
[2,0,2]]
In could in IDL do y = t[id] which would produce:
y = [[10,11,10]
On Wed, Sep 22, 2010 at 1:31 PM, Sebastian Walter
sebastian.wal...@gmail.com wrote:
Hello Friedrich,
I have read your proposal. You describe issues that I have also
encountered several times.
I believe that your priops approach would be an improvement over the
current overloading of binary
On Wed, Sep 22, 2010 at 12:08 PM, Lisandro Dalcin dalc...@gmail.com wrote:
On 22 September 2010 13:48, Charles R Harris charlesr.har...@gmail.com
wrote:
On Wed, Sep 22, 2010 at 8:35 AM, Lisandro Dalcin dalc...@gmail.com
wrote:
It seems that lib2to3 does not process the main f2py
On Wed, Sep 22, 2010 at 7:16 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
Done in 29cccb6.
Mmh, I think it broke something:
File /home/fperez/tmp/src/scipy/numpy/numpy/distutils/command/build.py,
line 37, in run
old_build.run(self)
File
On Wed, Sep 22, 2010 at 9:14 PM, Fernando Perez fperez@gmail.comwrote:
On Wed, Sep 22, 2010 at 7:16 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
Done in 29cccb6.
Mmh, I think it broke something:
File /home/fperez/tmp/src/scipy/numpy/numpy/distutils/command/build.py,
On Wed, Sep 22, 2010 at 10:00 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Wed, Sep 22, 2010 at 9:14 PM, Fernando Perez fperez@gmail.comwrote:
On Wed, Sep 22, 2010 at 7:16 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
Done in 29cccb6.
Mmh, I think it broke
21 matches
Mail list logo