Re: [Numpy-discussion] Faster array version of ndindex

2008-02-22 Thread Jarrod Millman
Could you provide more details about this to the ticket I created based on your email: http://projects.scipy.org/scipy/numpy/ticket/636 Thanks, On Thu, Dec 13, 2007 at 3:33 PM, Jonathan Taylor <[EMAIL PROTECTED]> wrote: > I was needing an array representation of ndindex since ndindex only > give

Re: [Numpy-discussion] Faster array version of ndindex

2007-12-19 Thread Jarrod Millman
Hey Jonathan, Thanks for providing this. I created a ticket for now: http://scipy.org/scipy/numpy/ticket/636 I will take some time to add this functionality to NumPy before the end of the year. Thanks, -- Jarrod Millman Computational Infrastructure for Research Labs 10 Giannini Hall, UC Berke

Re: [Numpy-discussion] Faster array version of ndindex

2007-12-14 Thread Stefan van der Walt
Hi Sebastian N.fromiter only works on 1D arrays. I thought the following may work, but it doesn't: np.fromiter(np.ndindex(10,10,10),N.dtype((int,3))) This kind of loop is probably best implemented in C, although I think Jonathan's version is rather clever. Regards Stéfan On Fri, Dec 14, 2007

Re: [Numpy-discussion] Faster array version of ndindex

2007-12-14 Thread Sebastian Haase
Do you know about N.fromiter() ? -Sebastian Haase On Dec 14, 2007 12:33 AM, Jonathan Taylor <[EMAIL PROTECTED]> wrote: > I was needing an array representation of ndindex since ndindex only > gives an iterator but array(list(ndindex)) takes too long. There is > prob some obvious way to do this I

[Numpy-discussion] Faster array version of ndindex

2007-12-13 Thread Jonathan Taylor
I was needing an array representation of ndindex since ndindex only gives an iterator but array(list(ndindex)) takes too long. There is prob some obvious way to do this I am missing but if not feel free to include this code which is much faster. In [252]: time a=np.array(list(np.ndindex(10,10,10,