[Numpy-discussion] Numpy Positional Array
Ian Mallett
geometrian@gmail....
Tue Mar 31 19:20:35 CDT 2009
Hello,
I'm trying to make an array of size n*n*2. It should be of the form:
[[[0,0],[1,0],[2,0],[3,0],[4,0], ... ,[n,0]],
[[0,1],[1,1],[2,1],[3,1],[4,1], ... ,[n,1]],
[[0,2],[1,2],[2,2],[3,2],[4,2], ... ,[n,2]],
[[0,3],[1,3],[2,3],[3,3],[4,3], ... ,[n,3]],
[[0,4],[1,4],[2,4],[3,4],[4,4], ... ,[n,4]],
... ... ... ... ... ... ...
[[0,n],[1,n],[2,n],[3,n],[4,n], ... ,[n,n]]]
Each vec2 represents the x,y position of the vec in the array itself. I'm
completely stuck on implementing this setup in numpy. Any pointers?
Thanks,
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090331/78718123/attachment.html
More information about the Numpy-discussion
mailing list