Numpy Positional Array
2009-04-01 00:20:35 GMT
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
_______________________________________________ Numpy-discussion mailing list Numpy-discussion <at> scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
RSS Feed