Re: [Numpy-discussion] 0/0 is 0 or nan?

2007-03-08 Thread Robert Kern
Chris Ball wrote: > Hi, > > I noticed some behavior that seems inconsistent to me: > from numpy import divide, seterr seterr(divide='ignore') > {'over': 'raise', 'divide': 'raise', 'invalid': 'raise', 'under': 'raise'} seterr() > {'over': 'raise', 'divide': 'ignore', 'invalid': 'ra

[Numpy-discussion] 0/0 is 0 or nan?

2007-03-08 Thread Chris Ball
Hi, I noticed some behavior that seems inconsistent to me: >>> from numpy import divide, seterr >>> seterr(divide='ignore') {'over': 'raise', 'divide': 'raise', 'invalid': 'raise', 'under': 'raise'} >>> seterr() {'over': 'raise', 'divide': 'ignore', 'invalid': 'raise', 'under': 'raise'} >>> divid

Re: [Numpy-discussion] in place random generation

2007-03-08 Thread Anne Archibald
On 08/03/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > For normals this seems overkill as the same result can be achieved by an > offset and scale, i.e., if r is an array of random numbers with mean 0 and > sigma 1, then > > myrandomarray = (r*mysigma + mymean) > > easily achieves the same res

Re: [Numpy-discussion] in place random generation

2007-03-08 Thread Charles R Harris
On 3/8/07, Robert Kern <[EMAIL PROTECTED]> wrote: Daniel Mahler wrote: > On 3/8/07, Charles R Harris <[EMAIL PROTECTED]> wrote: >> Robert thought this might relate to Travis' changes adding broadcasting to >> the random number generator. It does seem certain that generating small >> arrays of r

Re: [Numpy-discussion] in place random generation

2007-03-08 Thread Robert Kern
Daniel Mahler wrote: > On 3/8/07, Charles R Harris <[EMAIL PROTECTED]> wrote: >> Robert thought this might relate to Travis' changes adding broadcasting to >> the random number generator. It does seem certain that generating small >> arrays of random numbers has a very high overhead. > > Does tha

Re: [Numpy-discussion] in place random generation

2007-03-08 Thread Daniel Mahler
On 3/8/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > The slow down is probably related to this from a previous thread: > > In [46]: def test1() : >: x = normal(0,1,1000) >: > > In [47]: def test2() : >: for i in range(1000) : >: x = normal(0,1) >

Re: [Numpy-discussion] in place random generation

2007-03-08 Thread Daniel Mahler
On 3/8/07, Matthew Brett <[EMAIL PROTECTED]> wrote: > > > My problem is not space, but time. > > > I am creating a small array over and over, > > > and this is turning out to be a bottleneck. > > How about making one large random number array and taking small views? > How is that different from:

Re: [Numpy-discussion] numpy.linalg.qr bug on 64-bit platforms

2007-03-08 Thread David M. Cooke
On Mar 7, 2007, at 04:57 , Lars Bittrich wrote: On Monday 05 March 2007 08:01, Steffen Loeck wrote: Has there been any progress in solving this problem? I get the same error message and have no idea how to solve it. I do not understand those code parts very well but I think the values pas