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)
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
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, :,
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
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