[Numpy-discussion] review request for half type
Wed Nov 10 01:40:15 CST 2010
This set of patches fully implements a 16-bit floating point half type into
NumPy. It's got a lot of changes, but I've tried to organize them logically
so that it builds and the tests run after each patch. This took some tweaks
to the building and ufunc generation code, so please check that, as
particularly the setup.py looks like it could have subtleties I may have
missed. I implemented only the half type, but a complex variant wouldn't be
that hard to add once this is all set.
Here are the main features:
* 16-bit float as numpy.half or numpy.float16
* generates underflow/overflow signals
* rounds to the nearest (with half to even)
* uses character code 'j' -- The short type already had 'h', but if there's
a better choice, let me know.
The tests might provide the quickest insight into to workings of this code,
so I would suggest looking through it first:
Here's the branch with the patches:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion