Re: [Numpy-discussion] C API freeze and review

2011-03-09 Thread Charles R Harris
On Thu, Mar 10, 2011 at 12:15 AM, Ralf Gommers wrote: > Hi all, > > In preparation for making a 1.6.x branch, I just updated the C API > version. Please do not add any more functions before the branch is > created. > > Over 70 new functions and types were added, we should also review if > all thos

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the "basics" page

2011-03-09 Thread Ralf Gommers
On Thu, Mar 10, 2011 at 9:37 AM, Skipper Seabold wrote: > On Wed, Mar 9, 2011 at 8:13 PM, Ralf Gommers > wrote: >> On Wed, Mar 9, 2011 at 11:24 PM, Skipper Seabold wrote: > > I filed #1758. > > You can also assign with an array which fails silently, certainly a bug: > >>>

[Numpy-discussion] C API freeze and review

2011-03-09 Thread Ralf Gommers
Hi all, In preparation for making a 1.6.x branch, I just updated the C API version. Please do not add any more functions before the branch is created. Over 70 new functions and types were added, we should also review if all those are necessary and if they are documented. Below is a list of all ne

Re: [Numpy-discussion] Crash with nested recarray on Python 3.x

2011-03-09 Thread Christoph Gohlke
On 3/9/2011 10:29 PM, Charles R Harris wrote: > > > On Wed, Mar 9, 2011 at 11:20 PM, Christoph Gohlke > wrote: > > Hello, > > the following code crashes in the last line when using numpy 1.5.1 on > Python 3.1 and 3.2, 32 and 64 bit, for Windows. It works with

Re: [Numpy-discussion] Crash with nested recarray on Python 3.x

2011-03-09 Thread Charles R Harris
On Wed, Mar 9, 2011 at 11:20 PM, Christoph Gohlke wrote: > Hello, > > the following code crashes in the last line when using numpy 1.5.1 on > Python 3.1 and 3.2, 32 and 64 bit, for Windows. It works with Python > 2.x. Can anyone confirm the crash on other platforms? > > import numpy > RECORD1 = [

[Numpy-discussion] Crash with nested recarray on Python 3.x

2011-03-09 Thread Christoph Gohlke
Hello, the following code crashes in the last line when using numpy 1.5.1 on Python 3.1 and 3.2, 32 and 64 bit, for Windows. It works with Python 2.x. Can anyone confirm the crash on other platforms? import numpy RECORD1 = [('i', 'i4')] RECORD2 = [('j', RECORD1, 2)] a = numpy.recarray((1,), REC

Re: [Numpy-discussion] np.linalg.norm terrible behavior

2011-03-09 Thread Kibeom Kim
I wonder why numpy.norm doesn't call blas norm function by default. is there any good reason? or it's just not coded? -Kibeom Kim On Sun, Mar 6, 2011 at 12:13 PM, Till Stensitzki wrote: > > > > > Moreover, np.linalg.norm is slow compare to blas. > > > > Is there a way/plan to fix it? > > > > X

Re: [Numpy-discussion] : How to sum weighted matrices

2011-03-09 Thread shu wei
Thanks, it is very useful. On Wed, Mar 9, 2011 at 7:41 PM, Benjamin Root wrote: > This is a very good webpage that helped me when I was transitioning from > matlab to numpy. I hope it is helpful for you as well. > > http://www.scipy.org/NumPy_for_Matlab_Users > > Ben Root > > __

Re: [Numpy-discussion] Anybody going to PyCon?

2011-03-09 Thread Olivier Grisel
Hi all, I will be giving a tutorial on machine learning with scikit-learn tomorrow morning and a talk on text classification on Friday. Then I will stay until Monday evening. Regards, -- Olivier ___ NumPy-Discussion mailing list NumPy-Discussion@scipy

Re: [Numpy-discussion] Anybody going to PyCon?

2011-03-09 Thread Yung-Yu Chen
On Mon, Mar 7, 2011 at 09:11, David Cournapeau wrote: > On Mon, Mar 7, 2011 at 5:53 PM, Gökhan Sever > wrote: > > Hello, > > > > I am going to the PyCon this week. I am presenting a poster about an > > atmospheric sciences related project -- the most active development > > from my coding site ov

Re: [Numpy-discussion] : How to sum weighted matrices

2011-03-09 Thread Benjamin Root
This is a very good webpage that helped me when I was transitioning from matlab to numpy. I hope it is helpful for you as well. http://www.scipy.org/NumPy_for_Matlab_Users Ben Root ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mai

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the "basics" page

2011-03-09 Thread Skipper Seabold
On Wed, Mar 9, 2011 at 8:13 PM, Ralf Gommers wrote: > On Wed, Mar 9, 2011 at 11:24 PM, Skipper Seabold wrote: >> On Tue, Mar 8, 2011 at 8:08 PM, Skipper Seabold wrote: >>> On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers >>> wrote: On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold wrote:

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the "basics" page

2011-03-09 Thread Ralf Gommers
On Wed, Mar 9, 2011 at 11:24 PM, Skipper Seabold wrote: > On Tue, Mar 8, 2011 at 8:08 PM, Skipper Seabold wrote: >> On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers >> wrote: >>> On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold wrote: On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers wrote: >

[Numpy-discussion] : How to sum weighted matrices

2011-03-09 Thread shu wei
-- Forwarded message -- From: shu wei Date: Wed, Mar 9, 2011 at 6:34 PM Subject: Re: [Numpy-discussion] How to sum weighted matrices To: Nicolas SCHEFFER Thanks very much. I just copied the code your guys gave me. Both of them work great I used to program in Matlab. not familia

Re: [Numpy-discussion] Is there a memory-efficient alternative to choose?

2011-03-09 Thread Josh Hykes
> > Would the "out" keyword of np.choose be a possible solution? Using that, > you should be able to create the properies_map in place, and perhaps you can > then do the multiplication with the state variables in place also: Thanks, Lutz, for this suggestion. I hadn't thought of using the "out" k

Re: [Numpy-discussion] Any easy way to do this?

2011-03-09 Thread Angus McMorland
On 9 March 2011 10:37, Neal Becker wrote: > Angus McMorland wrote: > >> On 9 March 2011 09:45, Neal Becker wrote: >>> given: w[i,j,k], y[l, k] >>> >>> find: >>> d[l,i,j] = norm(w[i,j] - y[l]) >>> >>> for each triple (l,i,j), w[i,j]-y[l] is a vector, of which I want to find >>> the >>> norm, and

Re: [Numpy-discussion] Any easy way to do this?

2011-03-09 Thread Robert Kern
On Wed, Mar 9, 2011 at 09:37, Neal Becker wrote: > Angus McMorland wrote: > >> On 9 March 2011 09:45, Neal Becker wrote: >>> given: w[i,j,k], y[l, k] >>> >>> find: >>> d[l,i,j] = norm(w[i,j] - y[l]) >>> >>> for each triple (l,i,j), w[i,j]-y[l] is a vector, of which I want to find >>> the >>> nor

Re: [Numpy-discussion] Any easy way to do this?

2011-03-09 Thread Neal Becker
Angus McMorland wrote: > On 9 March 2011 09:45, Neal Becker wrote: >> given: w[i,j,k], y[l, k] >> >> find: >> d[l,i,j] = norm(w[i,j] - y[l]) >> >> for each triple (l,i,j), w[i,j]-y[l] is a vector, of which I want to find the >> norm, and store into d[l,i,j] > > Is something like this what you wa

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the "basics" page

2011-03-09 Thread Skipper Seabold
On Tue, Mar 8, 2011 at 8:08 PM, Skipper Seabold wrote: > On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers > wrote: >> On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold wrote: >>> On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers >>> wrote: On Sat, Mar 5, 2011 at 8:09 AM, Russell E. Owen wrote:

Re: [Numpy-discussion] Any easy way to do this?

2011-03-09 Thread Angus McMorland
On 9 March 2011 09:45, Neal Becker wrote: > given: w[i,j,k], y[l, k] > > find: > d[l,i,j] = norm(w[i,j] - y[l]) > > for each triple (l,i,j), w[i,j]-y[l] is a vector, of which I want to find the > norm, and store into d[l,i,j] Is something like this what you want to do? w = np.random.randint(100,

[Numpy-discussion] Any easy way to do this?

2011-03-09 Thread Neal Becker
given: w[i,j,k], y[l, k] find: d[l,i,j] = norm(w[i,j] - y[l]) for each triple (l,i,j), w[i,j]-y[l] is a vector, of which I want to find the norm, and store into d[l,i,j] ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.o

Re: [Numpy-discussion] [ANN] Bento 0.0.5, a packaging solution for python software

2011-03-09 Thread David Cournapeau
On Wed, Mar 9, 2011 at 8:34 PM, Ralf Gommers wrote: > Hi David, > > On Tue, Mar 8, 2011 at 10:07 PM, David Cournapeau wrote: >> Hi, >> >>    I am pleased to announce a new release of bento, a packaging >> solution for >> python which aims at reproducibility, extensibility and simplicity. > > Look

Re: [Numpy-discussion] Inaccuracy in documentation of np.linalg.pinv

2011-03-09 Thread Ralf Gommers
Hi Hao, On Wed, Mar 9, 2011 at 9:01 AM, Hao Xiong wrote: > I think the documentation for np.linalg.pinv contains some inaccuracies. Thanks for your comments. Are you interested to make some improvements yourself? It's quite easy to do on the numpy doc wiki: http://docs.scipy.org/numpy/docs/numpy

Re: [Numpy-discussion] [ANN] Bento 0.0.5, a packaging solution for python software

2011-03-09 Thread Ralf Gommers
Hi David, On Tue, Mar 8, 2011 at 10:07 PM, David Cournapeau wrote: > Hi, > >    I am pleased to announce a new release of bento, a packaging > solution for > python which aims at reproducibility, extensibility and simplicity. Looks great! Out of curiosity, do you have a timeline in mind for add

Re: [Numpy-discussion] deprecations for 1.6; assert_almost_equal

2011-03-09 Thread Ralf Gommers
On Mon, Mar 7, 2011 at 7:53 PM, Pauli Virtanen wrote: > Mon, 07 Mar 2011 06:39:20 -0500, josef.pktd wrote: Doc update committed in f527b49a. >> Why does assert_allclose have atol=0, while np.allclose has rtol=1.e-5, >> atol=1.e-8 ? > > Probably no reason, it should be fixed. I'm guessing that w

[Numpy-discussion] Cross compile flags for tdm-gcc on mingw

2011-03-09 Thread Jonathan Wright
Hi folks, I was compiling some extensions for 32-bit python 2.5 on windows using a 64 bit gcc compiler (4.5.1). After a bit of head scratching it seems that I needed to patch numpy/distutils/mingw32ccompiler.py to add the following flags around where it says "set_executables": -m32 -static-libgc