[Numpy-discussion] 1.6.0b1 half float buffer bug?
Fri Mar 25 12:35:30 CDT 2011
On Fri, Mar 25, 2011 at 10:21 AM, Pauli Virtanen <email@example.com> wrote:
> Fri, 25 Mar 2011 10:00:24 -0700, Eli Stevens (Gmail) wrote:
> > I'm working on getting support for 16-bit floats into cython and have
> > run into what seems like a numpy bug (I'm a new contributor to both
> > projects, so bear with me ;).
> > https://github.com/wickedgrey/numpy/
> > Adding NPY_HALF to the switch statement on line 350 of
> > numpy/core/src/multiarray/buffer.c doesn't seem controversial (unless it
> > needs to be spelled NPY_FLOAT16 or something similar), but I have no
> > idea how to test the change.
> The buffer interface cannot be used to export the half-float types, since
> the type is not specified in PEP 3118. Numpy cannot unilaterally add
> nonstandard format codes to the spec.
That said, I think starting a discussion with the Python core developers
about the float16 type is worthwhile. There might be interest in supporting
the float16 type in the struct interface, something that would be required
as part of amending PEP 3118.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion