[Numpy-discussion] Float16 and PEP 3118

Mark Wiebe mwwiebe at gmail.com
Fri Dec 3 12:23:15 EST 2010


On Thu, Dec 2, 2010 at 10:16 AM, Pauli Virtanen <pav at iki.fi> wrote:

> Before introducing a PEP 3118 type code for half floats in the PEP, one
> would need to argue the Python people to add it to the struct module.
>
> Before that, the choices probably are:
>
> - refuse to export buffers containing half floats
>

I think this is the better option, code that needs to do this can create an
int16 view for the time being.


> - export half floats as two bytes
>

This would throw away the byte-order, a problem much harder to track down
for the user than the other option.

-Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20101203/ec71b460/attachment.html>


More information about the NumPy-Discussion mailing list