[Numpy-discussion] Interrupting long running calculations ....

2008-08-18 Thread Sebastian Haase
Hi, Could someone remind me of the current state of numpy with regards to honoring KeyboardInterrupts !? I think KeyboardInterrupt is the exception that would have to be used to do this kind of thing - right !? E.g. by pressing Ctrl-C Another question, and not quite numpy specific, is how to

Re: [Numpy-discussion] Interrupting long running calculations ....

2008-08-18 Thread Fernando Perez
On Mon, Aug 18, 2008 at 12:09 AM, Sebastian Haase [EMAIL PROTECTED] wrote: Another question, and not quite numpy specific, is how to generate this exception from another thread -- effectively injecting it into the calling stack !? I ask this, because I'm using wxPython, which makes things

Re: [Numpy-discussion] Possible new multiplication operators for Python

2008-08-18 Thread Ondrej Certik
On Mon, Aug 18, 2008 at 1:50 AM, Andrew Dalke [EMAIL PROTECTED] wrote: On Aug 18, 2008, at 12:00 AM, Ondrej Certik wrote: There is some inconsistency though, for example one can override A() + A(), but one cannot override 1 + 1. This could (should) be fixed somehow. That will never, ever

Re: [Numpy-discussion] Please volunteer a Mac OS X buildbot slave

2008-08-18 Thread Barry Wark
Stéfan, Again, thanks to you and Thomas. cheers, Barry On Tue, Aug 12, 2008 at 10:08 AM, Stéfan van der Walt [EMAIL PROTECTED] wrote: 2008/8/12 Barry Wark [EMAIL PROTECTED]: Stefan, I'm sorry I dropped the ball on this one. I didn't have time to get things working again before I left town

Re: [Numpy-discussion] Generalized ufuncs?

2008-08-18 Thread Engel, Hans-Andreas
Robert Kern [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Sun, Aug 17, 2008 at 21:55, Anne Archibald [EMAIL PROTECTED] wrote: 2008/8/17 Robert Kern [EMAIL PROTECTED]: I suggested that we move it to a branch for the time being so we can play with it and come up with

Re: [Numpy-discussion] Generalized ufuncs?

2008-08-18 Thread Engel, Hans-Andreas
Charles R Harris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Sun, Aug 17, 2008 at 7:56 PM, Stéfan van der Walt [EMAIL PROTECTED]wrote: 2008/8/17 Robert Kern [EMAIL PROTECTED]: I suggested that we move it to a branch for the time being so we can play with it and come up

Re: [Numpy-discussion] indexing (compared to matlab)

2008-08-18 Thread Alan G Isaac
this should definitely be in the Numpy for Matlab users page, http://www.scipy.org/NumPy_for_Matlab_Users, right after the line: Matlab Numpy Notes Good form is to make that change yourself when you get useful advice. But I did it this time. Cheers, Alan Isaac

Re: [Numpy-discussion] Generalized ufuncs?

2008-08-18 Thread Travis E. Oliphant
The good news is that the patch just uses of the existing code to deal with all the tricky issues (this is why the patch is so short). By the way, sort could be implemented with the proposed specifications, its signature would be (i)-(i). I agree that it would be nice if that code could

Re: [Numpy-discussion] C-API change for 1.2

2008-08-18 Thread Travis E. Oliphant
David Cournapeau wrote: On Sat, Aug 16, 2008 at 11:59 PM, David Cournapeau [EMAIL PROTECTED] wrote: On Sat, Aug 16, 2008 at 11:16 PM, Charles R Harris [EMAIL PROTECTED] wrote: I'm slowly coming to the conviction that there should be no C-ABI changes in 1.2. It does not make

Re: [Numpy-discussion] C-API change for 1.2

2008-08-18 Thread Travis E. Oliphant
Charles R Harris wrote: On Sat, Aug 16, 2008 at 11:21 PM, David Cournapeau [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Sat, Aug 16, 2008 at 11:59 PM, David Cournapeau [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Sat, Aug 16, 2008 at 11:16 PM, Charles R Harris

Re: [Numpy-discussion] Generalized ufuncs?

2008-08-18 Thread Charles R Harris
On Mon, Aug 18, 2008 at 10:13 AM, Travis E. Oliphant [EMAIL PROTECTED] wrote: The good news is that the patch just uses of the existing code to deal with all the tricky issues (this is why the patch is so short). By the way, sort could be implemented with the proposed specifications, its

Re: [Numpy-discussion] C-API change for 1.2

2008-08-18 Thread Charles R Harris
On Mon, Aug 18, 2008 at 10:26 AM, Travis E. Oliphant [EMAIL PROTECTED] wrote: Charles R Harris wrote: On Sat, Aug 16, 2008 at 11:21 PM, David Cournapeau [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Sat, Aug 16, 2008 at 11:59 PM, David Cournapeau [EMAIL PROTECTED]

Re: [Numpy-discussion] Possible new multiplication operators for Python

2008-08-18 Thread Grégory Lielens
On Sat, 2008-08-16 at 22:03 -0700, Fernando Perez wrote: Hi all, [ please keep all replies to this only on the numpy list. I'm cc'ing the scipy ones to make others aware of the topic, but do NOT reply on those lists so we can have an organized thread for future reference] In the

Re: [Numpy-discussion] NumPy 1.2.0b2 released

2008-08-18 Thread Andrew Dalke
Andrew Dalke: Any chance of someone reviewing my suggestions for making the import somewhat faster still? http://scipy.org/scipy/numpy/ticket/874 Travis E. Oliphant: In sum: I think 2, 3, 6, 7, 8, and 9 can be done immediately. 1) and 4) could be O.K. but 1) does break code and 4

[Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Ondrej Certik
Hi, with Andrew's permission, I am starting a new thread, where our discussion is ontopic. :) My original question was, that I would like to override 1+1 to return MyClass(1, 1) or something. Robert said it would break other libraries and Andrew said this: On Mon, Aug 18, 2008 at 9:23 PM,

Re: [Numpy-discussion] NumPy 1.2.0b2 released

2008-08-18 Thread Travis E. Oliphant
Andrew Dalke wrote: Andrew Dalke: Any chance of someone reviewing my suggestions for making the import somewhat faster still? http://scipy.org/scipy/numpy/ticket/874 Travis E. Oliphant: In sum: I think 2, 3, 6, 7, 8, and 9 can be done immediately. 1) and 4) could be

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Andrew Dalke
On Aug 18, 2008, at 10:01 PM, Ondrej Certik wrote: with Andrew permission, I am starting a new thread, where our discussion is ontopic. :) Though I want to point out that without specific proposals of how the implementation might look, this thread will not go anywhere as it will be too distant

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Ondrej Certik
On Mon, Aug 18, 2008 at 10:45 PM, Andrew Dalke [EMAIL PROTECTED] wrote: On Aug 18, 2008, at 10:01 PM, Ondrej Certik wrote: with Andrew permission, I am starting a new thread, where our discussion is ontopic. :) Though I want to point out that without specific proposals of how the

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Christian Heimes
Ondrej Certik wrote: Ok, in the current state, you don't know either what's going to happen. If you write In [1]: x/2*3/4 you have no idea what the result is going to be, you need to analyze x.__div__() and start from there. But if you write In [2]: 1/2*3/4 currently you know it

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Ondrej Certik
Hi Christian, On Mon, Aug 18, 2008 at 11:22 PM, Christian Heimes [EMAIL PROTECTED] wrote: Ondrej Certik wrote: Ok, in the current state, you don't know either what's going to happen. If you write In [1]: x/2*3/4 you have no idea what the result is going to be, you need to analyze

Re: [Numpy-discussion] NumPy 1.2.0b2 released

2008-08-18 Thread Robert Kern
On Mon, Aug 18, 2008 at 15:04, Travis E. Oliphant [EMAIL PROTECTED] wrote: I say go ahead including changing #1 and #4. Let's leave 5 for the moment. I think we can just delete all of the test() and bench() functions except for numpy.{bench,test}(). That way, there is no code duplication. --

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Andrew Dalke
On Aug 18, 2008, at 11:22 PM, Christian Heimes wrote: Example syntax (rough idea): type(1.0) type 'float' with float as from decimal import Decimal type(1.0) class 'decimal.Decimal' When would this with float ... considered valid? For example, could I define things before asking for a

Re: [Numpy-discussion] Possible new multiplication operators for Python

2008-08-18 Thread Robert Kern
On Mon, Aug 18, 2008 at 12:21, Charles R Harris [EMAIL PROTECTED] wrote: Tim Hochberg proposed using the call operator for matrix multiplication, i.e., A(B(C)) Which has the advantage of using an existing operator. It looks like function composition, which isn't that far off the mark if

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Dag Sverre Seljebotn
Ondrej Certik wrote: Hi Christian, On Mon, Aug 18, 2008 at 11:22 PM, Christian Heimes [EMAIL PROTECTED] wrote: Ondrej Certik wrote: Ok, in the current state, you don't know either what's going to happen. If you write In [1]: x/2*3/4 you have no idea what the result is going to be, you

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Christian Heimes
Andrew Dalke wrote: When would this with float ... considered valid? [long posting] Oh h... what have I done ... *g* Slow down, please. For now there are no concrete plans what-so-ever to implement the feature in the near future. Some developers have expressed their interest in a way to

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Ondrej Certik
On Tue, Aug 19, 2008 at 1:06 AM, Christian Heimes [EMAIL PROTECTED] wrote: Andrew Dalke wrote: When would this with float ... considered valid? [long posting] Oh h... what have I done ... *g* Slow down, please. For now there are no concrete plans what-so-ever to implement the feature in

Re: [Numpy-discussion] NumPy 1.2.0b2 released

2008-08-18 Thread Stéfan van der Walt
2008/8/18 Travis E. Oliphant [EMAIL PROTECTED]: I say go ahead including changing #1 and #4. Let's leave 5 for the moment. I ran several benchmarks and made sure that these imports take a minimal amount of time. Wouldn't we want users to have access with the doc framework without doing

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Andrew Dalke
On Aug 19, 2008, at 1:06 AM, Christian Heimes wrote: [long posting] Oh h... what have I done ... *g* *shrug* I write long emails. I've been told that by several people. It's probably a bad thing. The ideas needs a good PEP. You are definitely up to something. You also came up with a

Re: [Numpy-discussion] NumPy 1.2.0b2 released

2008-08-18 Thread Travis E. Oliphant
Stéfan van der Walt wrote: 2008/8/18 Travis E. Oliphant [EMAIL PROTECTED]: I say go ahead including changing #1 and #4. Let's leave 5 for the moment. I ran several benchmarks and made sure that these imports take a minimal amount of time. Wouldn't we want users to have access with

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Scott Ransom
On Tue, Aug 19, 2008 at 01:57:20AM +0200, Andrew Dalke wrote: BTW, it's *fun* to modify an existing language and afterwards it you know a secret - that programming languages are just flimsy facades held together by a shared hallucination. Like in a dream, change things too much or leave

Re: [Numpy-discussion] Possible new multiplication operators for Python

2008-08-18 Thread Gael Varoquaux
On Sun, Aug 17, 2008 at 04:28:55PM -0400, Alan G Isaac wrote: That said, what kind of problems do you have in mind? A lot of software still don't deal well with unicode (wxPython's unicode situation under windows, for instance, in interesting). But wht I am most worried about is not being able

Re: [Numpy-discussion] global overloading of 1+1 - MyClass(1, 1)

2008-08-18 Thread Travis Vaught
On Aug 18, 2008, at 6:57 PM, Andrew Dalke wrote: ... BTW, it's *fun* to modify an existing language and afterwards it you know a secret - that programming languages are just flimsy facades held together by a shared hallucination. Like in a dream, change things too much or leave gaps and

Re: [Numpy-discussion] NumPy 1.2.0b2 released

2008-08-18 Thread Stéfan van der Walt
2008/8/18 Andrew Dalke [EMAIL PROTECTED]: How do users know that those are present? How do users view those docs? You're the one who added that directory, yes?, so you've probably got the most experience with it. I couldn't figure out it, and the README in the doc/ directory wasn't

Re: [Numpy-discussion] Possible new multiplication operators for Python

2008-08-18 Thread Stéfan van der Walt
2008/8/18 Gael Varoquaux [EMAIL PROTECTED]: I actually think PEP 225 is pretty good. I have not big opinion about ~ vs @. Both of these already have meanings (boolean not and decorator), so it's pretty much a toss-up for me. In a way, the concept of a decorator could still apply: @* takes the