Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Charles R Harris
On Mon, Jan 19, 2009 at 11:26 PM, Robert Kern wrote: > On Tue, Jan 20, 2009 at 00:21, Charles R Harris > wrote: > > > > On Mon, Jan 19, 2009 at 10:48 PM, Robert Kern > wrote: > >> > >> On Mon, Jan 19, 2009 at 23:36, Charles R Harris > >> wrote: > >> > > >> > On Mon, Jan 19, 2009 at 9:17 PM, Ro

Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Robert Kern
On Tue, Jan 20, 2009 at 00:21, Charles R Harris wrote: > > On Mon, Jan 19, 2009 at 10:48 PM, Robert Kern wrote: >> >> On Mon, Jan 19, 2009 at 23:36, Charles R Harris >> wrote: >> > >> > On Mon, Jan 19, 2009 at 9:17 PM, Robert Kern >> > wrote: >> >> >> >> On Mon, Jan 19, 2009 at 22:09, Charles R

Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Charles R Harris
On Mon, Jan 19, 2009 at 10:48 PM, Robert Kern wrote: > On Mon, Jan 19, 2009 at 23:36, Charles R Harris > wrote: > > > > On Mon, Jan 19, 2009 at 9:17 PM, Robert Kern > wrote: > >> > >> On Mon, Jan 19, 2009 at 22:09, Charles R Harris > >> wrote: > >> > > >> > > >> > On Mon, Jan 19, 2009 at 7:23

Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Robert Kern
On Mon, Jan 19, 2009 at 23:36, Charles R Harris wrote: > > On Mon, Jan 19, 2009 at 9:17 PM, Robert Kern wrote: >> >> On Mon, Jan 19, 2009 at 22:09, Charles R Harris >> wrote: >> > >> > >> > On Mon, Jan 19, 2009 at 7:23 PM, Jonathan Taylor >> > wrote: >> >> >> >> Interesting. That makes sense a

Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Charles R Harris
On Mon, Jan 19, 2009 at 9:17 PM, Robert Kern wrote: > On Mon, Jan 19, 2009 at 22:09, Charles R Harris > wrote: > > > > > > On Mon, Jan 19, 2009 at 7:23 PM, Jonathan Taylor > > wrote: > >> > >> Interesting. That makes sense and I suppose that also explains why > >> there is no function to do th

Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Robert Kern
On Mon, Jan 19, 2009 at 22:09, Charles R Harris wrote: > > > On Mon, Jan 19, 2009 at 7:23 PM, Jonathan Taylor > wrote: >> >> Interesting. That makes sense and I suppose that also explains why >> there is no function to do this sort of thing for you. > > A combination of relative and absolute err

Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Charles R Harris
On Mon, Jan 19, 2009 at 7:23 PM, Jonathan Taylor < jonathan.tay...@utoronto.ca> wrote: > Interesting. That makes sense and I suppose that also explains why > there is no function to do this sort of thing for you. > A combination of relative and absolute errors is another common solution, i.e., t

Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Jonathan Taylor
Interesting. That makes sense and I suppose that also explains why there is no function to do this sort of thing for you. Jon. On Mon, Jan 19, 2009 at 3:55 PM, Robert Kern wrote: > On Mon, Jan 19, 2009 at 14:43, Jonathan Taylor > wrote: >> Hi, >> >> When solving a quadratic equation I get that

Re: [Numpy-discussion] ANN: Numexpr 1.1, an efficient array evaluator

2009-01-19 Thread Andrew Collette
Hi Francesc, Looks like a cool project! However, I'm not able to achieve the advertised speed-ups. I wrote a simple script to try three approaches to this kind of problem: 1) Native Python code (i.e. will try to do everything at once using temp arrays) 2) Straightforward numexpr evaluation 3) S

Re: [Numpy-discussion] ANN: Numexpr 1.1, an efficient array evaluator

2009-01-19 Thread jh
Thanks! I think this will help the package attract a lot of users. A couple of housekeeping things: on http://code.google.com/p/numexpr: What it is? -> What is it? or What it is (no question mark) on http://code.google.com/p/numexpr/wiki/Overview: The last example got incorporated as stra

Re: [Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Robert Kern
On Mon, Jan 19, 2009 at 14:43, Jonathan Taylor wrote: > Hi, > > When solving a quadratic equation I get that alpha = > -3.78336776728e-31 which I believe to be far below machine precision: > > finfo(float).eps > 2.2204460492503131e-16 > > But an if statement like: > > if alpha == 0: > ... > > do

[Numpy-discussion] Testing for close to zero?

2009-01-19 Thread Jonathan Taylor
Hi, When solving a quadratic equation I get that alpha = -3.78336776728e-31 which I believe to be far below machine precision: finfo(float).eps 2.2204460492503131e-16 But an if statement like: if alpha == 0: ... does not catch this. Is there a better way to check for things that are essent

Re: [Numpy-discussion] ANN: Numexpr 1.1, an efficient array evaluator

2009-01-19 Thread Francesc Alted
A Sunday 18 January 2009, j...@physics.ucf.edu escrigué: > Francesc Alted wrote: > > > > Numexpr is a fast numerical expression evaluator for NumPy. > > > > With it, expressions that operate on arrays (like "3*a+4*b") > > > > are accelerated and use less memory than doing the same > > > > calculat

Re: [Numpy-discussion] Please don't use google code for hosting

2009-01-19 Thread Matthew Brett
Hi, > Do you also know how the situation is with sourceforge/launchpad/trac... > and other popular hosting systems ? > Do they also have these restrictions ? I've not noticed any problems with sourceforge, nor launchpad - I'm using them regularly from here. You'd hope that was the case for laun

Re: [Numpy-discussion] Please don't use google code for hosting

2009-01-19 Thread Matthew Brett
Hi, > As a workaround, you can ask the authors of the code your colleagues > are interested in to place their release tarballs on pypi in addition > to Google Code (the caveat being the 10MB/file limit imposed by the > admins. Complain to them, too!). For SVN access, you can probably set > up a bz

Re: [Numpy-discussion] Please don't use google code for hosting

2009-01-19 Thread Matthew Brett
Hi, > Seems odd that you'd post that from a gmail account. I'm not saying Google in general is bad. I'm just suggesting that, in the particular case of Google code, it would allow greater openness if you use something else. > I do sympathize with > your suggestion, but I don't have a better al

Re: [Numpy-discussion] new incremental statistics project

2009-01-19 Thread Hans Meine
On Friday 19 December 2008 03:27:12 Bradford Cross wrote: > This is a new project I just released. > > I know it is C#, but some of the design and idioms would be nice in > numpy/scipy for working with discrete event simulators, time series, and > event stream processing. > > http://code.google.com

Re: [Numpy-discussion] How to make "lazy" derived arrays in a recarray view of a memmap on large files

2009-01-19 Thread Kim Hansen
Hi Yakov, Thank you for you kind advice. I ended up doing something simpler and less arcane. I first read the baconandeggs interleaved data from a memmap, create a new writeable memmap based on an unpacked dtype, where bacon and eggs are in two different ': > The problem, as I understand it, is t

Re: [Numpy-discussion] How to make "lazy" derived arrays in a recarray view of a memmap on large files

2009-01-19 Thread Yakov Keselman
The problem, as I understand it, is this: you have a large array and you want to define objects that (1) behave like arrays; (2) are derived from the large array (can be computed from it); (3) should not take much space if only small portions of the large array are ever referenced. A simple solut

Re: [Numpy-discussion] question about memory ownership

2009-01-19 Thread Robert Kern
On Sun, Jan 18, 2009 at 07:17, Darren Dale wrote: > Thanks for the advice. I'd like to look into the second option, since the > former would not allow other in-place operations like *= /= **/. That is a good use case. > Hopefully > the package will be fit to share with this list before too long