[Numpy-discussion] Compiling numpy with 64 bits support under Solaris

2007-09-14 Thread Langella Raphael
Hi, I'm trying to compile numpy with 64 bits support under Sparc/Solaris 8. I've already compiled Python 2.5.1 with 64 bits. I've set up my environnement with : export CC=gcc -mcpu=v9 -m64 -D_LARGEFILE64_SOURCE=1 export CXX=g++ -mcpu=v9 -m64 -D_LARGEFILE64_SOURCE=1 export LDFLAGS='-mcpu=v9

Re: [Numpy-discussion] Compiling numpy with 64 bits support under Solaris

2007-09-14 Thread David Cournapeau
Langella Raphael wrote: Hi, I'm trying to compile numpy with 64 bits support under Sparc/Solaris 8. I've already compiled Python 2.5.1 with 64 bits. I've set up my environnement with : export CC=gcc -mcpu=v9 -m64 -D_LARGEFILE64_SOURCE=1 export CXX=g++ -mcpu=v9 -m64 -D_LARGEFILE64_SOURCE=1

[Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Ed Schofield
Hi everyone, This was reported yesterday as a bug in Debian's numpy package: len(numpy.arange(0, 0.6, 0.1)) == len(numpy.arange(0, 0.4+0.2, 0.1)) False The cause is this: ceil((0.4+0.2)/0.1) 7.0 ceil(0.6/0.1) 6.0 which holds for both numpy's and the standard library's ceil(). Using

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread lorenzo bolla
this is really annoying. Matlab handles the ceil weirdness quite well, though. -- ceil(0.6/0.1) ans = 6 ceil((0.4+0.2)/0.1) ans = 7 0:0.1:0.6 ans = 01.000e-001

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Joris De Ridder
Might using min(ceil((stop-start)/step), ceil((stop-start)/step-r)) with r = finfo(double).resolution instead of ceil((stop-start)/step) perhaps be useful? Joris On 14 Sep 2007, at 11:37, Ed Schofield wrote: Hi everyone, This was reported yesterday as a bug in Debian's numpy package:

[Numpy-discussion] Requesting svn write access to numpy ?

2007-09-14 Thread David Cournapeau
Hi, I would like to know whether I could request svn write access to numpy svn. There are several things I would like to work on which are big enough so that just patch would be difficult, and branches more appropriate, and my understanding is that svn branches requires write access. The

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Lou Pecora
I thought this is what the linspace function was written for in numpy. Why not use that? It works just like you would want always including the final point. --- Joris De Ridder [EMAIL PROTECTED] wrote: Might using min(ceil((stop-start)/step), ceil((stop-start)/step-r)) with r =

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Joris De Ridder
On 14 Sep 2007, at 15:54, Lou Pecora wrote: I thought this is what the linspace function was written for in numpy. Why not use that? AFAIK, linspace() is written to generate N evenly spaced numbers between start and stop inclusive. Similar but not quite the same as arange(). It works

Re: [Numpy-discussion] Requesting svn write access to numpy ?

2007-09-14 Thread Travis E. Oliphant
David Cournapeau wrote: Hi, I would like to know whether I could request svn write access to numpy svn. There are several things I would like to work on which are big enough so that just patch would be difficult, and branches more appropriate, and my understanding is that svn branches

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Robert Kern
Ed Schofield wrote: Hi everyone, This was reported yesterday as a bug in Debian's numpy package: len(numpy.arange(0, 0.6, 0.1)) == len(numpy.arange(0, 0.4+0.2, 0.1)) False The cause is this: ceil((0.4+0.2)/0.1) 7.0 ceil(0.6/0.1) 6.0 which holds for both numpy's and the

Re: [Numpy-discussion] Requesting svn write access to numpy ?

2007-09-14 Thread Jarrod Millman
Hey Travis (and David), Since you (Travis) approved, I went ahead and gave David (cdavid) svn commit access to numpy. If you (David) have any difficulties, feel free to email me directly and I will take care of it. Cheers, -- Jarrod Millman Computational Infrastructure for Research Labs 10

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Sebastian Haase
On 9/14/07, Charles R Harris [EMAIL PROTECTED] wrote: Since none of the numbers are exactly represented in IEEE floating point, this sort of oddity is expected. If you look at the exact values, (.4 + .2)/.1 6 and .6/.1 6 . Just for my own benefit (and the past time) here are the actual

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Eike Welk
On Friday 14 September 2007 20:12, Charles R Harris wrote: Since none of the numbers are exactly represented in IEEE floating point, this sort of oddity is expected. If you look at the exact values, (.4 + .2)/.1 6 and .6/.1 6 . That said, I would expect You hit send too fast! The

[Numpy-discussion] binomial, multinomial coefficients

2007-09-14 Thread Charles R Harris
Does anyone know if there are routines in scipy to compute these numbers? If not, I could code some up if there is any interest. As a related question, are there routines for returning the probabilities (as opposed to random number generators) for the various distributions? Chuck

Re: [Numpy-discussion] binomial, multinomial coefficients

2007-09-14 Thread Robert Kern
Charles R Harris wrote: Does anyone know if there are routines in scipy to compute these numbers? scipy.misc.comb() will handle the binomial coefficients. A ufunc or an implementation that would broadcast would be welcome, though. I don't think we have one for multinomial coefficients. If

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Joris De Ridder
the question is how to reduce user astonishment. IMHO this is exactly the point. There seems to be two questions here: 1) do we want to reduce user astonishment, and 2) if yes, how could we do this? Not everyone seems to be convinced of the first question, replying that in many cases

[Numpy-discussion] NotImplementedType

2007-09-14 Thread Tom Denniston
Sometimes numpy operationrs result in NotImplementedType. It makes it a little hard to debug because the problem then crops up later when you try to do an operation with the NotImplementedType. Does anyone know of a way to get numpy to raise instead of returning not implemented type? (Pydb)

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Timothy Hochberg
On 9/14/07, Joris De Ridder [EMAIL PROTECTED] wrote: the question is how to reduce user astonishment. IMHO this is exactly the point. There seems to be two questions here: 1) do we want to reduce user astonishment, and 2) if yes, how could we do this? Not everyone seems to be convinced of

Re: [Numpy-discussion] NotImplementedType

2007-09-14 Thread Travis E. Oliphant
Tom Denniston wrote: Sometimes numpy operationrs result in NotImplementedType. It makes it a little hard to debug because the problem then crops up later when you try to do an operation with the NotImplementedType. Does anyone know of a way to get numpy to raise instead of returning not

Re: [Numpy-discussion] NotImplementedType

2007-09-14 Thread Tom Denniston
The hitch is the error is in the bowels of the Scientific Python so I was trying to get it to throw an exception to see what was going on. It's while Scientific Python is trying to take a derivate. It's further aggrevated by the fact that due to some bug in pdb or pydb, i'm unable to get up the

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Charles R Harris
On 9/14/07, Timothy Hochberg [EMAIL PROTECTED] wrote: On 9/14/07, Joris De Ridder [EMAIL PROTECTED] wrote: the question is how to reduce user astonishment. IMHO this is exactly the point. There seems to be two questions here: 1) do we want to reduce user astonishment, and 2) if

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Charles R Harris
On 9/14/07, Robert Kern [EMAIL PROTECTED] wrote: Charles R Harris wrote: In the case of arange it should be possible to determine when the result is potentially ambiguous and issue a warning. For instance, if the argument of the ceil function is close to its rounded value. What's close?

[Numpy-discussion] Buildbot errors

2007-09-14 Thread Charles R Harris
I got another buildbot notification and as far as I can tell it has nothing to do with my last commit. The stdio output is at http://buildbot.scipy.org/MacOSX%20x86/builds/49/step-shell/0 And the errors seem to be of this sort: _configtest.c: In function 'main': _configtest.c:4: error: 'isnan'

Re: [Numpy-discussion] Buildbot errors

2007-09-14 Thread Robert Kern
Charles R Harris wrote: I got another buildbot notification and as far as I can tell it has nothing to do with my last commit. The stdio output is at http://buildbot.scipy.org/MacOSX%20x86/builds/49/step-shell/0 http://buildbot.scipy.org/MacOSX%20x86/builds/49/step-shell/0 That's not the

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Charles R Harris
On 9/14/07, lorenzo bolla [EMAIL PROTECTED] wrote: this is really annoying. Matlab handles the ceil weirdness quite well, though. -- ceil(0.6/0.1) ans = 6 ceil((0.4+0.2)/0.1) ans = 7 0:0.1:0.6 ans =

Re: [Numpy-discussion] Buildbot errors

2007-09-14 Thread Barry Wark
Sorry about the hassle. It was working fine before a reboot. I'll try to fix it this evening. barry On 9/14/07, Robert Kern [EMAIL PROTECTED] wrote: Charles R Harris wrote: I got another buildbot notification and as far as I can tell it has nothing to do with my last commit. The stdio

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Christopher Barker
Robert Kern wrote: Here's the thing: binary floating point is intrinsically surprising to people who are only accustomed to decimal. Very good point. Binary arithmetic is NOT less accurate that decimal arithmetic, it just has different values that it can't represent exactly. So one is

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Anne Archibald
On 15/09/2007, Christopher Barker [EMAIL PROTECTED] wrote: Oh, and could someone post an actual example of a use for which FP arange is required (with fudges to try to accommodate decimal to binary conversion errors), and linspace won't do? Well, here's one: evaluating a function we know to