Re: [Numpy-discussion] Helper function to "unroll" a array

2006-11-12 Thread Gael Varoquaux
You're probably right. Well it would most definitely be useful for all the lads in my lab, but I am not sure this is a broad audience. The use case is when you have a array representing data in an "mgrid" way, and you wnat to apply transformations to the coordinates. It is something I have done and

Re: [Numpy-discussion] Helper function to "unroll" a array

2006-11-12 Thread Sven Schreiber
Gael Varoquaux schrieb: > Hi all, > > I didn't get any answers to this email. Is it because the proposed > addition to numpy is not of any interest to anybody apart from me ? > Maybe the way I introduced this is wrong. Please tell me what is wrong > with this proposition. > Well you didn't m

Re: [Numpy-discussion] Helper function to "unroll" a array

2006-11-12 Thread Gael Varoquaux
Hi all, I didn't get any answers to this email. Is it because the proposed addition to numpy is not of any interest to anybody apart from me ? Maybe the way I introduced this is wrong. Please tell me what is wrong with this proposition. Regards, Gaƫl On Fri, Oct 20, 2006 at 01:28:52PM +0200

[Numpy-discussion] Helper function to "unroll" a array

2006-10-20 Thread Gael Varoquaux
Hi, There is an operation I do a lot, I would call it "unrolling" a array. The best way to describe it is probably to give the code: def unroll(M): """ Flattens the array M and returns a 2D array with the first columns being the indices of M, and the last column the flatten M. ""