Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Anne Archibald
2008/5/10 Timothy Hochberg <[EMAIL PROTECTED]>: > On Sat, May 10, 2008 at 1:37 PM, Anne Archibald <[EMAIL PROTECTED]> > wrote: >> >> 2008/5/10 Nathan Bell <[EMAIL PROTECTED]>: >> > On Sat, May 10, 2008 at 3:05 PM, Anne Archibald >> > <[EMAIL PROTECTED]> wrote: >> >> >> >> I don't expect my opinion

Re: [Numpy-discussion] ticket 788: possible blocker

2008-05-10 Thread Eric Firing
I have added a patch to the ticket. I believe it fixes the problem. It required mirroring a very complicated logical expression from PyArray_CastToType in array_cast. I suspect that for readability, this expression should be encapsulated somewhere as a function, with a signature like int Py

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Keith Goodman
On Sat, May 10, 2008 at 2:35 PM, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > Please, let's just leave the current matrix class alone. Any change > sufficient to make matrix not terrible, will break everyone's code. Instead, > the goal should be build a new matrix class (say newmatrix) where we ca

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Timothy Hochberg
On Sat, May 10, 2008 at 1:37 PM, Anne Archibald <[EMAIL PROTECTED]> wrote: > 2008/5/10 Nathan Bell <[EMAIL PROTECTED]>: > > On Sat, May 10, 2008 at 3:05 PM, Anne Archibald > > <[EMAIL PROTECTED]> wrote: > >> > >> I don't expect my opinion to prevail, but the point is that we do not > >> even have

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Jarrod Millman
On Sat, May 10, 2008 at 1:21 PM, Nathan Bell <[EMAIL PROTECTED]> wrote: > Would you object to raising a general Warning with a message like the > following? > > "matrix indexing of the form x[0] is ambiguous, consider the explicit > format x[0,:]" -1 I am not certain that there is universal agree

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Anne Archibald
2008/5/10 Nathan Bell <[EMAIL PROTECTED]>: > On Sat, May 10, 2008 at 3:05 PM, Anne Archibald > <[EMAIL PROTECTED]> wrote: >> >> I don't expect my opinion to prevail, but the point is that we do not >> even have enough consensus to agree on a recommendation to go in the >> DeprecationWarning. Alas.

[Numpy-discussion] ticket 788: possible blocker

2008-05-10 Thread Eric Firing
Jarrod et al., I just ran into a nasty bug, described in ticket 788: under some circumstances, which I don't understand, the astype method fails to return a copy and returns the original array instead. It causes bizarre behavior in basemap (Jeff Whitaker's mapping toolkit for matplotlib), whic

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Nathan Bell
On Sat, May 10, 2008 at 3:05 PM, Anne Archibald <[EMAIL PROTECTED]> wrote: > > I don't expect my opinion to prevail, but the point is that we do not > even have enough consensus to agree on a recommendation to go in the > DeprecationWarning. Alas. > Would you object to raising a general Warning wi

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Anne Archibald
2008/5/10 Jarrod Millman <[EMAIL PROTECTED]>: > On Sat, May 10, 2008 at 8:14 AM, Keith Goodman <[EMAIL PROTECTED]> wrote: >>> If these are backed out, will some kind of deprecation >>> warning be added for scalar indexing, as Travis suggested? >>> Robert's request seems in accord with this. >> >> S

Re: [Numpy-discussion] warn of matrix change?

2008-05-10 Thread Alan G Isaac
On Sat, 10 May 2008, Jarrod Millman apparently wrote: > I don't think it makes sense to add deprecation warnings > at this point--unless we know exactly what it is that we > will be doing in the future. My last comment on this ... As a user, I would want to know *now* that the behavior of sca

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Jarrod Millman
On Sat, May 10, 2008 at 8:14 AM, Keith Goodman <[EMAIL PROTECTED]> wrote: >> If these are backed out, will some kind of deprecation >> warning be added for scalar indexing, as Travis suggested? >> Robert's request seems in accord with this. > > Shouldn't a deprecation warning explain what the futur

[Numpy-discussion] ix_ with matrix input

2008-05-10 Thread Keith Goodman
Would it break a numpy design principle to allow ix_ to take 1xn and nx1 matrices as input? Here's the use case I had in mind: >> import numpy.matlib as mp >> x = mp.asmatrix(mp.arange(9).reshape(3,3)) >> ridx = x.sum(1) > 3 >> cidx = x.sum(0) > 9 >> x[mp.ix_(ridx, cidx)]

Re: [Numpy-discussion] searchsorted() and memory cache

2008-05-10 Thread Charles R Harris
On Sat, May 10, 2008 at 9:31 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > Hi Andrew > > 2008/5/9 Andrew Straw <[EMAIL PROTECTED]>: > > I've got a big element array (25 million int64s) that searchsorted() > > takes a long time to grind through. After a bit of digging in the > > literature a

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Keith Goodman
On Sat, May 10, 2008 at 9:24 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Sat, 10 May 2008, Keith Goodman apparently wrote: >> Shouldn't a deprecation warning explain what the future >> behavior will be? > > I do not think so. I think the warning should say: > "use x[0,:] instead of x[0] to re

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Alan G Isaac
>> On Sat, 10 May 2008, Jarrod Millman wrote: >>> unless there are major objections, I am going to back out >>> the matrices changes in the 1.1 branch. > On Sat, May 10, 2008 at 8:08 AM, Alan G Isaac > <[EMAIL PROTECTED]> wrote: >> If these are backed out, will some kind of deprecation >> warn

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Alan McIntyre
On Sat, May 10, 2008 at 11:14 AM, Keith Goodman <[EMAIL PROTECTED]> wrote: > Shouldn't a deprecation warning explain what the future behavior will > be? Is there a firm consensus on what that behavior will be? For what the opinion of an interested observer is worth: I honestly can't tell whether t

Re: [Numpy-discussion] searchsorted() and memory cache

2008-05-10 Thread Stéfan van der Walt
Hi Andrew 2008/5/9 Andrew Straw <[EMAIL PROTECTED]>: > I've got a big element array (25 million int64s) that searchsorted() > takes a long time to grind through. After a bit of digging in the > literature and the numpy source code, I believe that searchsorted() is > implementing a classic binary s

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Keith Goodman
On Sat, May 10, 2008 at 8:08 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Sat, 10 May 2008, Jarrod Millman wrote: >> unless there are major objections, I am going to back out >> the matrices changes in the 1.1 branch. > > If these are backed out, will some kind of deprecation > warning be added

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Alan G Isaac
On Sat, 10 May 2008, Jarrod Millman wrote: > unless there are major objections, I am going to back out > the matrices changes in the 1.1 branch. If these are backed out, will some kind of deprecation warning be added for scalar indexing, as Travis suggested? Robert's request seems in accord wit

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Jarrod Millman
On Sat, May 10, 2008 at 2:47 AM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Sat, May 10, 2008 at 4:35 AM, Jarrod Millman <[EMAIL PROTECTED]> wrote: > >> However, we will be releasing 1.2 in a few months and it will be >> entirely possible to break the matrices API then if there is an >> agreement

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Robert Kern
On Sat, May 10, 2008 at 4:35 AM, Jarrod Millman <[EMAIL PROTECTED]> wrote: > However, we will be releasing 1.2 in a few months and it will be > entirely possible to break the matrices API then if there is an > agreement that it still needs to be done. Please, let's have a firm policy of having a

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Jarrod Millman
On Fri, May 9, 2008 at 8:36 AM, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > My personal opinion is that current matrix class is pretty useless and the > change won't help much from my point of view. My preference would be to > leave the matrix class alone, design a new matrix class, with a differ

Re: [Numpy-discussion] Uncomfortable with matrix change

2008-05-10 Thread Jarrod Millman
Hello, I have obviously decided to delay tagging 1.1.0 until we resolve this. I didn't realize that numpy matrices were used in scipy or I would have brought this up before, but whatever matrix change we make in 1.1 has to work with the scipy 0.6. Unfortunately, I can't check myself at the momen

Re: [Numpy-discussion] Power domain (was Re: bug in oldnumeric.ma)

2008-05-10 Thread Jonathan Wright
Anne Archibald wrote: > 2008/5/9 Eric Firing <[EMAIL PROTECTED]>: > > >> It seems like some strategic re-thinking may be needed in the long run, >> if not immediately. > I think in principle the right answer is to simply run whatever > underlying function, and mask any NaNs or Infs in the outpu