[Numpy-discussion] Numpy Positional Array

Partridge, Matthew BGI SYD Matthew.Partridge@barclaysglobal....
Tue Mar 31 19:45:22 CDT 2009

> The array follows a pattern: each array of length 2 represents the x,y
index of that array within the larger array.  
Is this what you are after?

>>> numpy.array(list(numpy.ndindex(n,n))).reshape(n,n,2)

This message and any attachments are confidential, proprietary, and may be privileged. If this message was misdirected, Barclays Global Investors (BGI) does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BGI, unless the author is authorized by BGI to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BGI. Although BGI operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed.

More information about the Numpy-discussion mailing list