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

2008-08-18 Thread David Cournapeau
On Mon, Aug 18, 2008 at 10:04 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > >If you could figure out how to add a new flags field > without affecting the old one or requiring existion applications to be > recompiled, that would be good. Adding a member to a struct does not break ABI as long as

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: @

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 h

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

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 still think we are going about this the wrong way. We have two >> different sets of expectations, and we can't satisfy both by ripping >> everything apart. I'd much prefer two entry points into NumPy: one >> for people who need speed, and one

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] NumPy 1.2.0b2 released

2008-08-18 Thread Andrew Dalke
On Aug 19, 2008, at 1:48 AM, Stéfan van der Walt wrote: > Wouldn't we want users to have access with > the doc framework without doing anything special? And, yes, some of > the documents are empty, but a number of them have already been > written. How do users know that those are present? How do

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] 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 a

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 wit

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 anyth

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 th

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

2008-08-18 Thread Alan G Isaac
> 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)) Robert Kern wrote: > It's certainly worth exploring. My personal opinion is that I could > just use a single operator fo

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 a

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 r

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 mar

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) > with float as from decimal import Decimal type(1.0) > When would this "with float ... " considered valid? For example, could I define things before asking for a redefinition? def

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 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 a

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

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 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 distan

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)

[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, Andrew

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

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

2008-08-18 Thread Charles R Harris
On Mon, Aug 18, 2008 at 10:55 AM, Grégory Lielens <[EMAIL PROTECTED]>wrote: > 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

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 Py

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] > > > wrote: > > > > On Sat, Aug 16, 2008 at 11:59 PM, David Cournapeau > >

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,

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] > > wrote: > > On Sat, Aug 16, 2008 at 11:59 PM, David Cournapeau > <[EMAIL PROTECTED] > wrote: > > On Sat, Aug 16, 2008 at 11:16 PM,

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

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

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 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

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

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

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

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 th

[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 g