Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan G Isaac
On Tue, 15 Apr 2008, Anne Archibald apparently wrote: This discussion risks going around in circles. Write up your proposed solutions, with example code, in PEP style, here: http://www.scipy.org/ProposedEnhancements Done: http://www.scipy.org/MatrixIndexing I am a NumPy user, not a NumPy

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan G Isaac
On 15/04/2008, Alan G Isaac [EMAIL PROTECTED] wrote: I thought the context of the discussion had become something like this: there is no reason for the matrix interface to deviate from the array interface except as needed to provide specific desired functionality. Essentially,

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Stéfan van der Walt
On 16/04/2008, Alan G Isaac [EMAIL PROTECTED] wrote: The whole issue occurs because a Matrix is not a proper container. Right. And *that* is the case because of the attempt to treat matrices as containers of matrices instead of as containers of 1d arrays. I can see no real

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Anne Archibald
On 16/04/2008, Stéfan van der Walt [EMAIL PROTECTED] wrote: On 16/04/2008, Alan G Isaac [EMAIL PROTECTED] wrote: The whole issue occurs because a Matrix is not a proper container. Right. And *that* is the case because of the attempt to treat matrices as containers of

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Stéfan van der Walt
On 16/04/2008, Anne Archibald [EMAIL PROTECTED] wrote: I don't think of arrays as containers of anything but scalars, so I find this whole argument from intuition extremely strange. I see now for the first time that Matrices can't have dims 2. Grim. I do think that ColumnVector and

Re: [Numpy-discussion] Py3K

2008-04-16 Thread Tim Michelsen
This looks like something that need to go on a list for numpy 1.2. Can you post a list of the specific problems that need to be addressed?Chuck Maybe this post can give some hints: All Things Pythonic Python 3000 and You by Guido van Rossum March 17, 2008 Summary I've posted the slides

[Numpy-discussion] numpy setup.py too restrictive, prevents use of fblas with cblas

2008-04-16 Thread George Nurser
Apologies for coming out of the woodwork so late here.. For blas/atlas etc in numpy scipy on an opteron I use the AMD libraries (which only have fblas) together with cblas. This works very well. Current-ish SVN (v4779) in line 295-296 of numpy/core/setup.py has: if

Re: [Numpy-discussion] Py3K

2008-04-16 Thread Stéfan van der Walt
On 16/04/2008, Fernando Perez [EMAIL PROTECTED] wrote: On Tue, Apr 15, 2008 at 1:27 PM, Charles R Harris Oh, and making the transition will be made a lot easier by having a complete set of tests. Getting the tests and documentation into good state might be the best focus for our 1.2

Re: [Numpy-discussion] Py3K

2008-04-16 Thread Bruce Southey
Tim Michelsen wrote: This looks like something that need to go on a list for numpy 1.2. Can you post a list of the specific problems that need to be addressed?Chuck Maybe this post can give some hints: All Things Pythonic Python 3000 and You by Guido van Rossum March 17, 2008

Re: [Numpy-discussion] numpy setup.py too restrictive, prevents use of fblas with cblas

2008-04-16 Thread Travis E. Oliphant
George Nurser wrote: Apologies for coming out of the woodwork so late here.. For blas/atlas etc in numpy scipy on an opteron I use the AMD libraries (which only have fblas) together with cblas. This works very well. Current-ish SVN (v4779) in line 295-296 of numpy/core/setup.py has:

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan G Isaac
On Wed, 16 Apr 2008, Stéfan van der Walt apparently wrote: Your proposal suggests that a Matrix be a container of arrays, but it does not address the slicing of column vectors, i.e. x[0] x[0,:] x[:,0] The only thing that changes is the handling of scalar indices (and thus of

Re: [Numpy-discussion] Py3K

2008-04-16 Thread Ondrej Certik
On Wed, Apr 16, 2008 at 2:56 PM, Stéfan van der Walt [EMAIL PROTECTED] wrote: On 16/04/2008, Fernando Perez [EMAIL PROTECTED] wrote: On Tue, Apr 15, 2008 at 1:27 PM, Charles R Harris Oh, and making the transition will be made a lot easier by having a complete set of tests. Getting

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan G Isaac
On Wed, 16 Apr 2008, Anne Archibald apparently wrote: My (draconian) suggestion would be to simply raise an exception when a matrix is indexed with a scalar. This has been suggested before. But then, why? Again, this imposes a deviation from the behavior of arrays that provides no gain in

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Konrad Hinsen
On Apr 15, 2008, at 11:41, Gael Varoquaux wrote: On Tue, Apr 15, 2008 at 01:38:45AM -0500, Robert Kern wrote: Given that the next release will be 1.1, I think it is reasonable to include a few additional API breaks. -lots. I don't want to break API compatibility again no matter what

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Charles R Harris
On Wed, Apr 16, 2008 at 8:06 AM, Alan G Isaac [EMAIL PROTECTED] wrote: On Wed, 16 Apr 2008, Anne Archibald apparently wrote: My (draconian) suggestion would be to simply raise an exception when a matrix is indexed with a scalar. This has been suggested before. But then, why? Again, this

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Stéfan van der Walt
On 16/04/2008, Alan G Isaac [EMAIL PROTECTED] wrote: The rule is: to get a submatrix, use multiple indices. As Anne has argued, this is natural. That is *not* the rule for arrays; you argued the compatibility point yourself. As far as I know, no objections have been raised by users of

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Gael Varoquaux
On Wed, Apr 16, 2008 at 10:06:05AM -0400, Alan G Isaac wrote: if you want a submatrix you should provide both indices (possibly including a :). Yes. We exactly agree on this. Please persuade Stefan. Alan, instead of trying blindly to persuade Stefan, please listen to his arguments. Or

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan Isaac
On Wed, 16 Apr 2008, Gael Varoquaux wrote: let us pretend A[:, 1] returns a 1D array, as you seem to be wanting Where did I say anything like that?? Please look at the proposal. It affects **only** scalar indexing (and thereby iteration). Recall how emphatically I agreed with you: Multiple

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan Isaac
On 16/04/2008, Alan G Isaac [EMAIL PROTECTED] wrote: The rule is: to get a submatrix, use multiple indices. On Wed, 16 Apr 2008, Stéfan van der Walt wrote: That is not the rule for arrays; you argued the compatibility point yourself. Sorry, I do not understand. I am saying only: I

Re: [Numpy-discussion] numpy setup.py too restrictive, prevents use of fblas with cblas

2008-04-16 Thread Stéfan van der Walt
Hi Robert On 16/04/2008, Robert Kern [EMAIL PROTECTED] wrote: The correct fix needs to be more sophisticated than removing those two lines. We need to recognize the MKL and the GOTO BLAS and allow them, too. It might also be worth including the appropriate subset of the cblas code

[Numpy-discussion] OSX installer: please test

2008-04-16 Thread Christopher Burns
I've built a Universal Mac binary for numpy 1.1.0. If Mac people would kindly test it, I'd appreciate any feedback. Download here: https://cirl.berkeley.edu/numpy/numpy-1.1.0rc1-py2.5-macosx10.5.dmg Technical details: - Built on OSX 10.5.2, Intel Core 2 Duo - Using XCode 3.0 with gcc 4.0.1 and

Re: [Numpy-discussion] numpy setup.py too restrictive, prevents use of fblas with cblas

2008-04-16 Thread Robert Kern
On Wed, Apr 16, 2008 at 3:37 PM, Stéfan van der Walt [EMAIL PROTECTED] wrote: Hi Robert On 16/04/2008, Robert Kern [EMAIL PROTECTED] wrote: The correct fix needs to be more sophisticated than removing those two lines. We need to recognize the MKL and the GOTO BLAS and allow them,

Re: [Numpy-discussion] numpy setup.py too restrictive, prevents use of fblas with cblas

2008-04-16 Thread Andreas Klöckner
On Mittwoch 16 April 2008, Stéfan van der Walt wrote: The inclusion of those cblas routines sounds like a good idea. Could you describe which we need, and what would be required to get this done? Suppose cblas gets included in numpy, but for some reason someone decides to link another copy

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan G Isaac
On Wed, 16 Apr 2008, Stéfan van der Walt apparently wrote: Do you think that a (column) vector should convert to a 1d array? Yes: for consistency with row vector conversion, and for indexing consistency. Again, I understand what you have done, and it addresses my core issue. I do not object

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan G Isaac
On Wed, 16 Apr 2008, Stéfan van der Walt apparently wrote: I showed you exactly where your proposal breaks down -- numerous times: x[0] is no longer the same as x[0,:] And as I explained back: this is a good thing (TM). There is no need for these to be the same. I also gave you the simple

Re: [Numpy-discussion] numpy setup.py too restrictive, prevents use of fblas with cblas

2008-04-16 Thread Robert Kern
On Wed, Apr 16, 2008 at 4:56 PM, Andreas Klöckner [EMAIL PROTECTED] wrote: On Mittwoch 16 April 2008, Stéfan van der Walt wrote: The inclusion of those cblas routines sounds like a good idea. Could you describe which we need, and what would be required to get this done? Suppose cblas

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Stéfan van der Walt
On 17/04/2008, Alan G Isaac [EMAIL PROTECTED] wrote: It is not a breakdown. It is the proposal: restore the proper behavior of x[0], but keep submatrix extraction **exactly** the same as it is now (for nonscalar indexes). What it gains is that x[i][j] == x[i,j]. As the patch I sent

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Gael Varoquaux
On Wed, Apr 16, 2008 at 06:02:53PM -0400, Alan G Isaac wrote: On Wed, 16 Apr 2008, Stéfan van der Walt apparently wrote: I showed you exactly where your proposal breaks down -- numerous times: x[0] is no longer the same as x[0,:] And as I explained back: this is a good thing (TM). There

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Stéfan van der Walt
On 17/04/2008, Stéfan van der Walt [EMAIL PROTECTED] wrote: On 17/04/2008, Alan G Isaac [EMAIL PROTECTED] wrote: It is not a breakdown. It is the proposal: restore the proper behavior of x[0], but keep submatrix extraction **exactly** the same as it is now (for nonscalar

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Alan G Isaac
On Thu, 17 Apr 2008, Gael Varoquaux apparently wrote: I am sorry, I don't see why you prioritize x[i][j] == x[i,j] (1) more than x[0] == x[0,:] (2). Well the quick answer is: use matrices for awhile, and I expect you will see why, and teach them for awhile, and I am quite sure you will see

Re: [Numpy-discussion] Release of NumPy

2008-04-16 Thread Travis E. Oliphant
Alan G Isaac wrote: On Thu, 17 Apr 2008, Gael Varoquaux apparently wrote: I am sorry, I don't see why you prioritize x[i][j] == x[i,j] (1) more than x[0] == x[0,:] (2). Well the quick answer is: use matrices for awhile, and I expect you will see why, and teach them for awhile,