Re: [Numpy-discussion] two dimensional array of sets

2010-08-12 Thread David Warde-Farley
On 2010-08-12, at 5:54 PM, gerardob wrote: > As i wrote, the elements of each A[i][j] are sets and not numbers. Ah, missed that part. Assuming you don't need/want these sets to be mutable or differently sized, you could do something like this. Here we make 'n' an array of the numbers 0 to 49,

Re: [Numpy-discussion] two dimensional array of sets

2010-08-12 Thread Benjamin Root
On Thu, Aug 12, 2010 at 2:59 PM, gerardob wrote: > > Hello, this is a very basic question but i don't know the answer. > > I would like to construct a two dimensional array A, such that A[i][j] > contains a set of numbers associated to the pair (i,j). For example, > A[i][j] > can be all the numbe

Re: [Numpy-discussion] two dimensional array of sets

2010-08-12 Thread gerardob
As i wrote, the elements of each A[i][j] are sets and not numbers. David Warde-Farley-2 wrote: > > On 2010-08-12, at 3:59 PM, gerardob wrote: > >> >> Hello, this is a very basic question but i don't know the answer. >> >> I would like to construct a two dimensional array A, such that A[i][j]

Re: [Numpy-discussion] two dimensional array of sets

2010-08-12 Thread Ian Mallett
Hi, You can use np.mgrid to construct a grid of coordinates. From there, you can make your new array based on these coordinates however you like. Ian ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/nu

Re: [Numpy-discussion] two dimensional array of sets

2010-08-12 Thread David Warde-Farley
On 2010-08-12, at 3:59 PM, gerardob wrote: > > Hello, this is a very basic question but i don't know the answer. > > I would like to construct a two dimensional array A, such that A[i][j] > contains a set of numbers associated to the pair (i,j). For example, A[i][j] > can be all the numbers that

[Numpy-discussion] two dimensional array of sets

2010-08-12 Thread gerardob
Hello, this is a very basic question but i don't know the answer. I would like to construct a two dimensional array A, such that A[i][j] contains a set of numbers associated to the pair (i,j). For example, A[i][j] can be all the numbers that are written as i^n*j*5-n for some all n=1,..,5 Is nump