Hello List -
Any reason why the following doesn't work?
>>> x,y = meshgrid(linspace(-1,1,10),linspace(-1,1,10))
>>> z = complex(x,y)
Traceback (most recent call last):
File "<pyshell#225>", line 1, in ?
z = complex(x,y)
TypeError: only length-1 arrays can be converted to Python scalars
I know I can make an empty complex z array with the size of x, then
set z.real equal to x and z.imag equal to y. But is there any reason
why the above shouldn't work? It would be easy to implement in numpy,
wouldn't it? If so, I would *really* like it.
Thanks for your help,
Mark
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion