[Numpy-discussion] wiki page for record arrays
Gary Ruben
gruben at bigpond.net.au
Tue Feb 21 06:25:13 EST 2006
Thanks for this Stéfan,
Can I make some observations. I don't want to just change your
formatting. I think it would be good to have some discussion about the
formatting used in tutorials like this, because all should probably
follow a standard presentation style.
I like the usage summary at the end.
1. I'd put 'assumes from numpy import *' in the preamble.
2. Is it possible to change the formatting to make it more obvious what
is input and what is output? I think it is better to show the input and
output with a standard Python prompt a'la idle or possibly ipython.
A couple of things specific to your examples:
3. I think it might be worth pointing out that
img = array([(0,0,0), (1,0,0), (0,1,0), (0,0,1)], [('r',Float32),('g',F
loat32),('b',Float32)])
is valid syntax that can be replaced by the 2-line version you present.
Should the valid syntax for creating a record array be presented in EBNF
format?
4. Can you explain dtype=(void,12)?
5. When the page's name is changed, a link should be put to it in the
'Getting Started and Tutorial' section of the Documentation page.
What do you and others think?
Gary R.
Stefan van der Walt wrote:
> I wrote a short tutorial on using record arrays, which can be found at
>
> http://www.scipy.org/ArrayRecords
>
> The page is named ArrayRecords instead of RecordArrays, so I'd be glad
> if someone with priviledges could rename it. Also, please fix any
> mistakes I might have made.
>
> Regards
> Stéfan
More information about the NumPy-Discussion
mailing list