[Numpy-discussion] I/O options

2008-11-05 Thread Nils Wagner
Hi all, How can I save an array to a file with the following so called small field format (NASTRAN). Each row consists of ten fields of eight characters each. Field 10 is used only for optional continuation information when applicable. 123456781234567812345678123456781234567812345678123456781234

Re: [Numpy-discussion] passing a C array to embedded Python fromC code

2008-11-05 Thread Chris LeBlanc
Hi Matthieu, Thanks very much, thats exactly the sort of information I was looking for. I'm heading to a conference this weekend, but hope to get started on this very soon. Cheers, Chris On Tue, Nov 4, 2008 at 10:34 PM, Matthieu Brucher <[EMAIL PROTECTED]> wrote: > Hi, > > I've translated it on

Re: [Numpy-discussion] New ufuncs

2008-11-05 Thread Charles R Harris
On Wed, Nov 5, 2008 at 3:09 PM, Charles R Harris <[EMAIL PROTECTED]>wrote: > > > On Wed, Nov 5, 2008 at 2:41 PM, Stéfan van der Walt <[EMAIL PROTECTED]>wrote: > >> 2008/11/5 T J <[EMAIL PROTECTED]>: >> > numpy, it seems that logadd or logaddexp is probably a more fitting >> > name. So long as it

Re: [Numpy-discussion] New ufuncs

2008-11-05 Thread Charles R Harris
On Wed, Nov 5, 2008 at 2:41 PM, Stéfan van der Walt <[EMAIL PROTECTED]>wrote: > 2008/11/5 T J <[EMAIL PROTECTED]>: > > numpy, it seems that logadd or logaddexp is probably a more fitting > > name. So long as it is documented, I doubt it matters much though... > > Please don't call it logadd. `lo

Re: [Numpy-discussion] New ufuncs

2008-11-05 Thread Stéfan van der Walt
2008/11/5 T J <[EMAIL PROTECTED]>: > numpy, it seems that logadd or logaddexp is probably a more fitting > name. So long as it is documented, I doubt it matters much though... Please don't call it logadd. `logaddexp` or `logsumexp` are both fine, but the `exp` part is essential in emphasising th

Re: [Numpy-discussion] [EMAIL PROTECTED]

2008-11-05 Thread Christian K.
darn! How could I be that stupid... Please ignore the last message. Christian ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] New ufuncs

2008-11-05 Thread T J
On Wed, Nov 5, 2008 at 12:00 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > Hmm I wonder if the base function should be renamed logaddexp, then > logsumexp would apply to the reduce method. Thoughts? > As David mentioned, logsumexp is probably the traditional name, but as the earlier link s

Re: [Numpy-discussion] New ufuncs

2008-11-05 Thread Charles R Harris
On Wed, Nov 5, 2008 at 12:01 PM, Neal Becker <[EMAIL PROTECTED]> wrote: > Anne Archibald wrote: > > > 2008/11/5 Charles R Harris <[EMAIL PROTECTED]>: > >> Hi All, > >> > >> I'm thinking of adding some new ufuncs. Some possibilities are > >> > >> expadd(a,b) = exp(a) + exp(b) -- For numbers stored

Re: [Numpy-discussion] New ufuncs

2008-11-05 Thread Neal Becker
Anne Archibald wrote: > 2008/11/5 Charles R Harris <[EMAIL PROTECTED]>: >> Hi All, >> >> I'm thinking of adding some new ufuncs. Some possibilities are >> >> expadd(a,b) = exp(a) + exp(b) -- For numbers stored as logs: > > Surely this should be log(exp(a)+exp(b))? That would be extremely useful,

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Robert Kern
On Wed, Nov 5, 2008 at 08:05, Giovanni Samaey <[EMAIL PROTECTED]> wrote: >> >> Hi, >> how about other seed values ? I thought seed=0, is (often) used to >> mean a "random", i.e. current time or alike, seed value ... !? > > Not in this case: I always get the same sequence with seed=0 > (different f

Re: [Numpy-discussion] New ufuncs

2008-11-05 Thread Alan G Isaac
> Charles R Harris wrote: >> Hmm... but I'm thinking one has to be clever here because the main >> reason I heard for using logs was that normal floating point numbers >> had insufficient range. So maybe something like >> >> logadd(a,b) = a + log(1 + exp(b - a)) >> >> where a > b ? On 11/5/2008 1

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Gabriel Gellner
On Wed, Nov 05, 2008 at 03:19:09PM +0100, Matthieu Brucher wrote: > > Not in this case: I always get the same sequence with seed=0 > > (different for both implementation, but the same each time I run it.) > > I got around it by installing pygsl and taking random numbers from > > there instead of fr

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Matthieu Brucher
> Not in this case: I always get the same sequence with seed=0 > (different for both implementation, but the same each time I run it.) > I got around it by installing pygsl and taking random numbers from > there instead of from numpy. > > But I still find it strange to get two different sequences f

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Giovanni Samaey
> > Hi, > how about other seed values ? I thought seed=0, is (often) used to > mean a "random", i.e. current time or alike, seed value ... !? Not in this case: I always get the same sequence with seed=0 (different for both implementation, but the same each time I run it.) I got around it by ins

[Numpy-discussion] [EMAIL PROTECTED]

2008-11-05 Thread Christian K.
Hallo Nina, ich huete gerade meinen kranken Sohn, wollte aber nicht versaeumen, Platten zu reservieren: Januar bis einschliesslich Juni 2009 haette ich gerne 2 Platten pro Monat gruesse, Christian ___ Numpy-discussion mailing list Numpy-discussion@sci

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread David Cournapeau
Sebastian Haase wrote: > > Hi, > how about other seed values ? I thought seed=0, is (often) used to > mean a "random", i.e. current time or alike, seed value ... !? > Not really. A fixed seed means you will always get the exact same serie of numbers. The seed is the initial condition of your r

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Sebastian Haase
On Wed, Nov 5, 2008 at 11:30 AM, Giovanni Samaey <[EMAIL PROTECTED]> wrote: > Hi all, > I have a question concerning the Mersenne Twister random number generation > in numpy: when I seed it with 0, I get a different sequence of numbers in > numpy, compared to GSL. > In numpy: > r = numpy.Random.Ra

[Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Giovanni Samaey
Hi all, I have a question concerning the Mersenne Twister random number generation in numpy: when I seed it with 0, I get a different sequence of numbers in numpy, compared to GSL. In numpy: r = numpy.Random.RandomState(seed=0) r.uniform(size=5) > array([ 0.5488135 , 0.71518937,