Re: [Numpy-discussion] Can numpy catch this error for me?

2009-04-07 Thread Partridge, Matthew BGI SYD
On Tue, Apr 7, 2009 at 14:19, Nathaniel Peterson nathanielpeterso...@gmail.com wrote: import numpy as np import operator np.seterr(all='raise') a=np.arange(1)+1 print(a.dtype) # int32 for num in range(1,17): a=np.arange(num)+1 b=np.multiply.reduce(a)

Re: [Numpy-discussion] Numpy Positional Array

2009-03-31 Thread Partridge, Matthew BGI SYD
The array follows a pattern: each array of length 2 represents the x,y index of that array within the larger array. Is this what you are after? numpy.array(list(numpy.ndindex(n,n))).reshape(n,n,2) -- This message and any attachments are confidential, proprietary, and may be

[Numpy-discussion] lost with slicing

2009-03-30 Thread Partridge, Matthew BGI SYD
I apologise if I'm asking an obvious question or one that has already been addressed. I've tried to understand the documentation in the numpy manual on slicing, but I'm a bit lost. I'm trying to do indexing using both slices and index lists. I have a problem when I do something like: x[0, :,

Re: [Numpy-discussion] lost with slicing

2009-03-30 Thread Partridge, Matthew BGI SYD
I apologise if I'm asking an obvious question or one that has already been addressed. I've tried to understand the documentation in the numpy manual on slicing, but I'm a bit lost. I'm trying to do indexing using both slices and index lists. I have a problem when I do

Re: [Numpy-discussion] lost with slicing

2009-03-30 Thread Partridge, Matthew BGI SYD
Sorry group. I found Travis Oliphant's earlier 12 March post (that didn't show up in the same thread), and found the answer to my question. matt I apologise if I'm asking an obvious question or one that has already been addressed. I've tried to understand the documentation in