[Numpy-discussion] wiki page for record arrays

Stefan van der Walt stefan at sun.ac.za
Tue Feb 28 01:57:07 EST 2006

Hi Joe,

On Mon, Feb 27, 2006 at 09:23:35PM -0500, Joe Harrington wrote:
> I fixed a small error.  I found myself a bit lost.  Are cookbook pages
> supposed to be introductory, or are they aimed at users who already
> know a fair bit?  From the page, I can vaguely get that record arrays
> allow you access to your data using text strings as partial indexers,
> but I found myself focusing so much on testing whether this was true
> and figuring out how they work that I was completely distracted from
> the example.  A paragraph or two at the top explaining what a record
> array is, why it's useful, and what the basic properties are would be
> good.  Then give the example.  Also, it's less than intuitive why you
> are storing RGB values (usually thought of as integers in the range
> 0-255 or 0x00 - 0xff) in 32-bit floating-point numbers.

Thanks for the feedback.  Of course, any cookbook should aim to be as
simple as possible.  I wrote this as I figured out record arrays, and
proposed it as a starting point -- so feel free to improve it as you
see fit.

While <= 8-bit images can be stored as integers in [0-255], it is
common to use floating point numbers in [0-1] for any depth image.


More information about the NumPy-Discussion mailing list