[Numpy-discussion] Suggestion: Add the unsqueeze function to numpy

2011-04-20 Thread Yannick Copin
Hi, I'm a very frequent user of the following unsqueeze function, which I initially copied from scipy/stats/models/robust/scale.py and which seems to be also present in scikits.statsmodels.tools.unsqueeze. Would it be possible to include it natively to numpy? def unsqueeze(data, axis,

Re: [Numpy-discussion] Suggestion: Add the unsqueeze function to numpy

2011-04-20 Thread josef . pktd
On Wed, Apr 20, 2011 at 6:27 AM, Yannick Copin y.co...@ipnl.in2p3.fr wrote: Hi, I'm a very frequent user of the following unsqueeze function, which I initially copied from scipy/stats/models/robust/scale.py and which seems to be also present in scikits.statsmodels.tools.unsqueeze. Would it be

Re: [Numpy-discussion] Beginner's question

2011-04-20 Thread Brett Olsen
On Sat, Apr 16, 2011 at 2:08 PM, Laszlo Nagy gand...@shopzeus.com wrote: import numpy as np import numpy.random as rnd def dim_weight(X):     weights = X[0]     volumes = X[1]*X[2]*X[3]     res = np.empty(len(volumes), dtype=np.double)     for i,v in enumerate(volumes):         if v5184:

[Numpy-discussion] ATLAS - support letter

2011-04-20 Thread Matthew Brett
Hi, I'm on the ATLAS mailing list, maybe some of y'all are too. Clint Whaley, the author of ATLAS, was asking for letters to support his tenure case. That is, letters saying that lots of us benefit greatly from his work - which is obviously true. Can we the numpy community produce such a

Re: [Numpy-discussion] Suggestion: Add the unsqueeze function to numpy

2011-04-20 Thread Yannick Copin
josef.pktd at gmail.com writes: I also proposed this already once. However there is already function in numpy (where I have often problems remembering the name): numpy.expand_dims(a, axis) Ah, thanks for the tip, I didn't know this one. The name is unfortunate indeed... Cheers,

Re: [Numpy-discussion] Suggestion: Add the unsqueeze function to numpy

2011-04-20 Thread Daniel Lepage
You can also insert new axes when you slice an array via np.newaxis, fwiw: import numpy as np x = np.random.random((3,4,5)) y = x.mean(axis=1) y.shape (3, 5) y[:,np.newaxis,:].shape (3, 1, 5) -- Dan Lepage On Wed, Apr 20, 2011 at 1:24 PM, Yannick Copin yannick.co...@laposte.net wrote:  

Re: [Numpy-discussion] Suggestion: Add the unsqueeze function to numpy

2011-04-20 Thread Bruce Southey
On 04/20/2011 12:24 PM, Yannick Copin wrote: josef.pktdat gmail.com writes: I also proposed this already once. However there is already function in numpy (where I have often problems remembering the name): numpy.expand_dims(a, axis) Ah, thanks for the tip, I didn't know this one. The

Re: [Numpy-discussion] Suggestion: Add the unsqueeze function to numpy

2011-04-20 Thread josef . pktd
On Wed, Apr 20, 2011 at 2:19 PM, Daniel Lepage dplep...@gmail.com wrote: You can also insert new axes when you slice an array via np.newaxis, fwiw: import numpy as np x = np.random.random((3,4,5)) y = x.mean(axis=1) y.shape (3, 5) y[:,np.newaxis,:].shape (3, 1, 5) That's convenient if

Re: [Numpy-discussion] status for 1.6.0

2011-04-20 Thread Ralf Gommers
On Tue, Apr 19, 2011 at 8:54 AM, David Cournapeau courn...@gmail.com wrote: On Mon, Apr 18, 2011 at 1:47 PM, David Cournapeau courn...@gmail.com wrote: On Mon, Apr 18, 2011 at 12:55 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: Hi, The list of open issues for 1.6.0 is down to a

Re: [Numpy-discussion] status for 1.6.0

2011-04-20 Thread Ralf Gommers
On Mon, Apr 18, 2011 at 2:36 AM, Christoph Gohlke cgoh...@uci.edu wrote: On 4/17/2011 8:55 AM, Ralf Gommers wrote: Hi, The list of open issues for 1.6.0 is down to a handful: - f2py segfault on Ubuntu reported by David (David, did you get any further with this?) - #1801:

Re: [Numpy-discussion] status for 1.6.0

2011-04-20 Thread Christoph Gohlke
On 4/20/2011 1:55 PM, Ralf Gommers wrote: On Mon, Apr 18, 2011 at 2:36 AM, Christoph Gohlkecgoh...@uci.edu wrote: On 4/17/2011 8:55 AM, Ralf Gommers wrote: Hi, The list of open issues for 1.6.0 is down to a handful: - f2py segfault on Ubuntu reported by David (David, did you get any

Re: [Numpy-discussion] ATLAS - support letter

2011-04-20 Thread pratik
On Wednesday 20 April 2011 10:57 PM, Matthew Brett wrote: Hi, I'm on the ATLAS mailing list, maybe some of y'all are too. Clint Whaley, the author of ATLAS, was asking for letters to support his tenure case. That is, letters saying that lots of us benefit greatly from his work - which is

Re: [Numpy-discussion] ATLAS - support letter

2011-04-20 Thread Alan G Isaac
On 4/20/2011 9:55 PM, pratik wrote: If the place where he is seeking tenure does not know his name (i.e hasn't heard of ATLAS) Letters are often more for administrators, who can be from any field, than for the department faculty. fwiw, Alan Isaac

Re: [Numpy-discussion] ATLAS - support letter

2011-04-20 Thread Gael Varoquaux
On Thu, Apr 21, 2011 at 07:25:18AM +0530, pratik wrote: If the place where he is seeking tenure does not know his name (i.e hasn't heard of ATLAS) then it is not a good place to seek tenure in :) . Scholars undervalue code and don't realise the difficulty and the amount of work it takes to

Re: [Numpy-discussion] ATLAS - support letter

2011-04-20 Thread Matthew Brett
Hi, On Wed, Apr 20, 2011 at 10:45 PM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Thu, Apr 21, 2011 at 07:25:18AM +0530, pratik wrote: If the place where he is seeking tenure does not know his name (i.e hasn't heard of ATLAS) then it is not a good place to seek tenure in :) .

Re: [Numpy-discussion] ATLAS - support letter

2011-04-20 Thread Gael Varoquaux
On Wed, Apr 20, 2011 at 10:49:10PM -0700, Matthew Brett wrote: Well - thanks for the offer - Clint was asking for individual letters too, you could email and ask him? I can do that, and ask around me. Are you on the math-atlas list? No I am not. If not I'll forward you his request...

Re: [Numpy-discussion] ATLAS - support letter

2011-04-20 Thread Matthew Brett
Hi, On Wed, Apr 20, 2011 at 6:55 PM, pratik pratik.mal...@gmail.com wrote: On Wednesday 20 April 2011 10:57 PM, Matthew Brett wrote: Hi, I'm on the ATLAS mailing list, maybe some of y'all are too.  Clint Whaley, the author of ATLAS, was asking for letters to support his tenure case.  That