Re: [Numpy-discussion] simple rectangular grid

2010-04-15 Thread Robert Kern
On Thu, Apr 15, 2010 at 13:42, Neal Becker wrote: > Is there a simple way to create a rectangular grid, like this loopy code: > (This is for a QAM256 constellation, btw): > > import numpy as np > > u = np.arange (-7.5, 8) > > const = np.empty ((16,16), dtype=complex) > > for ix in range (16): >  

Re: [Numpy-discussion] simple rectangular grid

2010-04-15 Thread josef . pktd
On Thu, Apr 15, 2010 at 2:42 PM, Neal Becker wrote: > Is there a simple way to create a rectangular grid, like this loopy code: > (This is for a QAM256 constellation, btw): > > import numpy as np > > u = np.arange (-7.5, 8) > > const = np.empty ((16,16), dtype=complex) > > for ix in range (16): >

[Numpy-discussion] simple rectangular grid

2010-04-15 Thread Neal Becker
Is there a simple way to create a rectangular grid, like this loopy code: (This is for a QAM256 constellation, btw): import numpy as np u = np.arange (-7.5, 8) const = np.empty ((16,16), dtype=complex) for ix in range (16): for iy in range (16): const[ix, iy] = u[ix] + 1j*u[iy] __