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: test_half.py<https://github.com/m-paradox/numpy/blob/f04138667e638e47e6ea6096e05ef306070730a5/numpy/core/tests/test_half.py> Here's the branch with the patches: https://github.com/m-paradox/numpy/compare/master...implement_half_dtype Thanks, Mark
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion