In article <rowen-1ff89a.11051515072...@news.gmane.org>, "Russell E. Owen" <ro...@uw.edu> wrote:
> Is it straightforward to generate a record array (preferably a standard > numpy.ndarray, not the numpy.rec variant) where some named fields > contain pairs of numbers, for example: > > named field pos contains pairs of floats > named field rot contains floats > > Any pointers to relevant documentation would be appreciated. I found a > basic intro to record arrays on the scipy web site (which was quite > useful for generating simple record arrays), and the numpy book has a > bit of info, but I've not found anything very comprehensive. > > -- Russell Never mind. I found it today based on a posting; the kind of array I was interested in is a "structured array" and using that term the docs are easy to find, e.g.: <http://docs.scipy.org/doc/numpy/user/basics.rec.html> In particular: numpy.zeros(shape, dtype=[("pos", float, (2,)), ("rot", float)]) -- Russell _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion