pybind11
pybind11 copied to clipboard
[BUG]: NPY_HALF is not supported
Required prerequisites
- [X] Make sure you've read the documentation. Your issue may be addressed there.
- [X] Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- [x] Consider asking first in the Gitter chat room or in a Discussion.
Problem description
NPY_HALF is supported by Numpy but not yet supported by pybind11.
From numpy/ndarraytypes.h there is enum NPY_TYPES { ... NPY_HALF, ...}.
However, from pybind11/numpy.h
struct npy_api {
enum constants { ... }
, it doesn't have NPY_HALF_
Reproducible example code
No response
There is a workaround here: https://github.com/pybind/pybind11/issues/1776 Since we don't support any versions of Numpy that don't have np.half anymore, I would welcome a PR that added these additions to the master.
I'm working on a PR for this and have some questions. See discussion #4627 :)