[Numpy-discussion] Does float16 exist?
Tue Jan 8 19:49:15 CST 2008
Bill Baxter wrote:
> On Jan 9, 2008 9:18 AM, Charles R Harris <email@example.com> wrote:
>> On Jan 8, 2008 5:01 PM, Bill Baxter <firstname.lastname@example.org> wrote:
>>> On Jan 9, 2008 8:03 AM, Charles R Harris <email@example.com>
>>>> On Jan 8, 2008 1:58 PM, Bill Baxter < firstname.lastname@example.org> wrote:
>>>>> If you're really going to try to do it, Charles, there's an
>>>>> implementation of float16 in the OpenEXR toolkit.
>>>>> Or more precisely it's in the files in the Half/ directory of this:
>>>>> I don't know if it's IEEE conformant or not (especially w.r.t. NaN's
>>>>> and such) but it should be a good start. The code seems to be well
>>>> The license looks good, essentially BSD. The code is all C++, which is
>>>> obvious way to go for this sort of thing, and I would like to stick with
>>>> but that could lead to build/compatibility problems. I think NumPy
>>>> should really be in C++. Maybe scons can help with the build.
>>> Yeh, I was just thinking you'd rip out and C-ify the main algorithms
>>> rather than trying to wrap it as-is.
>> I'd rather not C-ify the thing, I'd rather C++-ify parts of NumPy. I note
>> that MatPlotLab uses C++, so some of the problems must have been solved.
A big chunk of C++ in matplotlib has just been replaced, largely because
it was so hard to understand and extend for everyone but its author.
There is still C++ code as well as C code in mpl. Personally, I prefer
> If you think that's easier then go for it.
The opinion that C++ would improve numpy is not universal, and has been
> As far as classes go, though, you pretty much won't find anything
> easier than this to C-ify. Or just to wrap in C. No templates. No
> inheritance. Just a simple value-type struct that supports a small
> set of operations.
> Numpy-discussion mailing list
More information about the Numpy-discussion