Re: [Numpy-discussion] question about memory ownership

2009-01-19 Thread Robert Kern
On Sun, Jan 18, 2009 at 07:17, Darren Dale dsdal...@gmail.com 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

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

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 'u1' fields, and then I simply convert

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.

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

[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

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

2009-01-19 Thread Robert Kern
On Mon, Jan 19, 2009 at 14:43, Jonathan Taylor jonathan.tay...@utoronto.ca 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 ==

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

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)

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 robert.k...@gmail.com wrote: On Mon, Jan 19, 2009 at 14:43, Jonathan Taylor jonathan.tay...@utoronto.ca wrote: Hi,

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., test

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 charlesr.har...@gmail.com wrote: 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

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 robert.k...@gmail.com wrote: On Mon, Jan 19, 2009 at 22:09, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jan 19, 2009 at 7:23 PM, Jonathan Taylor jonathan.tay...@utoronto.ca wrote: Interesting. That makes sense and I suppose

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 charlesr.har...@gmail.com wrote: On Mon, Jan 19, 2009 at 9:17 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jan 19, 2009 at 22:09, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jan 19, 2009 at 7:23 PM, Jonathan Taylor

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 robert.k...@gmail.com wrote: On Mon, Jan 19, 2009 at 23:36, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jan 19, 2009 at 9:17 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jan 19, 2009 at 22:09, Charles R Harris

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 charlesr.har...@gmail.com wrote: On Mon, Jan 19, 2009 at 10:48 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jan 19, 2009 at 23:36, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jan 19, 2009 at 9:17 PM, Robert Kern

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 robert.k...@gmail.com wrote: On Tue, Jan 20, 2009 at 00:21, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jan 19, 2009 at 10:48 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Jan 19, 2009 at 23:36, Charles R Harris