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"!
And
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 16(f7.2,1x),i3,3x,f13.5,1x,f10.5,1
On Wed, Sep 22, 2010 at 2:04 AM, keekychen.shared
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')
>
> x['f2'] = y
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 t
On Wed, Sep 22, 2010 at 11:10 PM, Neal Becker 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
___
David Cournapeau wrote:
> On Wed, Sep 22, 2010 at 11:10 PM, Neal Becker 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
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 a human readable or printable version of the initial state?
Altern
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 a human readable or print
On Wed, Sep 22, 2010 at 09:27, 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 a human readabl
On Wed, Sep 22, 2010 at 09:10, Neal Becker 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 (using buffer=
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 wrote:
> David Cournapeau wrote:
>
>> On Wed, Sep 22, 2010 at 11:10 PM, Neal Becker 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 canno
On Wed, Sep 22, 2010 at 8:35 AM, Lisandro Dalcin 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, f2py works just
On Tue, Sep 21, 2010 at 6:20 PM, Timothy W. Hilton wrote:
> Hello,
>
> I have an indexing problem which I suspect has a simple solution, but
> I've not been able to piece together various threads I've read on this
> list to solve.
>
> I have an 80x1200x1200 nd.array of floats this_par. I have a
>
On Wed, Sep 22, 2010 at 10:32 AM, Neal Becker wrote:
> 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 th
On Wed, Sep 22, 2010 at 10:34 AM, Robert Kern wrote:
> On Wed, Sep 22, 2010 at 09:27, 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 re
On Wed, Sep 22, 2010 at 10:48, wrote:
> On Wed, Sep 22, 2010 at 10:34 AM, Robert Kern wrote:
>> On Wed, Sep 22, 2010 at 09:27, 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 li
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.
On 9/21/2010 7:49 PM, josef.p...@gmail.com
On Wed, Sep 22, 2010 at 8:35 AM, Lisandro Dalcin 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, f2py works just
On 09/22/2010 11:16 AM, 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'
On 22 September 2010 13:48, Charles R Harris wrote:
>
>
> On Wed, Sep 22, 2010 at 8:35 AM, Lisandro Dalcin 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 wit
josef.p...@gmail.com wrote:
> On Wed, Sep 22, 2010 at 10:32 AM, Neal Becker wrote:
>> 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
On 9/22/2010 10:28 AM, Bruce Southey wrote:
...
>
> On my old Windows XP (service pack 2!) running Python 2.5.2, running
> 'numpy-1.1.0-win32-superpack-python2.5.exe' registers numpy (Python 2.5
> numpy-1.1.0).
>
> So you really have to remove numpy from the registry - usually via the
> 'Add/
On 21 September 2010 19:20, Timothy W. Hilton 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 this_par with the
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
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 Pytho
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
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]
> [10,12,10]
Thank you Anne
I was doing something totally stupid at my end.
Ross
On Wed, Sep 22, 2010 at 3:42 PM, Anne Archibald
wrote:
> On 22 September 2010 16:38, Ross Williamson
> wrote:
>> Hi everyone
>>
>> I suspect this is easy but I'm stuck
>>
>> say I have a 1D array:
>>
>> t = [10,11,12]
>>
>> an
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
On Wed, Sep 22, 2010 at 12:08 PM, Lisandro Dalcin wrote:
> On 22 September 2010 13:48, Charles R Harris
> wrote:
> >
> >
> > On Wed, Sep 22, 2010 at 8:35 AM, Lisandro Dalcin
> wrote:
> >>
> >> It seems that lib2to3 does not process the main f2py bootstrap script
> >> that gets autogenerated by
On Wed, Sep 22, 2010 at 7:16 PM, Charles R Harris
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 "/usr/lib/python2.6/distutils/command/build.py", line 135,
On Wed, Sep 22, 2010 at 9:14 PM, Fernando Perez wrote:
> On Wed, Sep 22, 2010 at 7:16 PM, Charles R Harris
> 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.ru
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 wrote:
>
>> On Wed, Sep 22, 2010 at 7:16 PM, Charles R Harris
>> wrote:
>> >
>> > Done in 29cccb6.
>> >
>>
>> Mmh, I think it broke something:
>>
>> File
On Wed, Sep 22, 2010 at 4:14 AM, Anne Archibald
wrote:
> Hi Ken,
>
> This is a tricky one. The current behaviour of rollaxis is to remove
> the requested axis from the list of axes and then insert it before the
> axis specified. This is exactly how python's list insertion works:
>
> In [1]: a = ra
35 matches
Mail list logo