Open dastrobu opened 6 months ago
relates to #1908
Hello! Yes, it's true half floats are not currently available. You can see extra information here: https://github.com/pybind/pybind11/discussions/4627 and a workaround from the issue here: https://github.com/pybind/pybind11/issues/1776
None of the core devs have responded to the discussion but I'm still very interested in bringing support of the half-float type from OpenEXR / Imath directly. The question is how they want to proceed with it.
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.11.1
Problem description
when constructing a buffer format for a dtype
float16
array, I get:RuntimeError: NumPy type info missing for Dh
. Here is a full function to reproduce:float16_t
is defined astypedef __fp16 float16_t
inarm_fp16.h
running on MacOS.According to the python buffer protocol specs float16 should be represented as 'e'.
Numpy and tensor flow are following this convention:
Reproducible example code
Is this a regression? Put the last known working version here if it is.
Not a regression