Re: ENH: Add float16, npy_half, specific routines to the NumPy C-API as NpyHalf*

Amelia Thurdekoos <[email protected]> Mon, 24 Nov 2025 10:33:32 -0800
Newsgroups gmane.comp.python.numeric.general
Message-ID <CAFsiu11sTJ_pJBYdTrST_wgiRwnNj-mL0EdE0UEc8yZ0oJE1tg@mail.gmail.com>
> ...could we at least try to use the bit width in the name such as float16
> as much as possible?


 This is all excellent feedback, thank you! I agree, more explicit is
better. Planning as best as we can with an eye to future clarity, seems
reasonable.


> The important part here seems to be pushing the goal of getting rid of
> npy_math, what is the plan for the rest of it here?  Just getting rid
> of it completely because it is obsolete?



If we introduce this now users will adopt it in 2-3 years (old NumPy
> versions don't have it).
> Now there is no guarantee that e.g. `float16_t` will be generally
> supported (it's optional anyway) but if the situation around half
> improves just a little, I wonder if by the time this is useful it won't
> already be completely obsolete, rather than just mostly.


Thanks for the feedback Sebastian! I agree, the overarching goal is
removing npy_math. This proposal's scope is intentionally limited to the
float16/halffloat part as one self-contained step in that direction, rather
than trying to solve the whole npy_math feature at once. I am not going to
be removing any part of the library as part of this effort.

If float16 improves enough that this API becomes obsolete, or even less
attractive, this effort still yields a net positive. It will assist with
reducing the need to link against npy_math.

- Amelia

_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]