[Numpy-svn] [numpy/numpy] c2d904: ENH: Changes (and tests) to allow exporting half-f...

noreply at github.com noreply at github.com
Sat Apr 2 14:31:37 EDT 2011


Branch: refs/heads/maintenance/1.6.x
Home:   https://github.com/numpy/numpy

Commit: c2d904ac59d1756c8fa38942e4a4d880d79ec193
    https://github.com/numpy/numpy/commit/c2d904ac59d1756c8fa38942e4a4d880d79ec193
Author: Eli Stevens <elis at doselab.com>
Date:   2011-04-02 (Sat, 02 Apr 2011)

Changed paths:
  M numpy/core/_internal.py
  M numpy/core/src/multiarray/buffer.c
  M numpy/core/tests/test_multiarray.py

Log Message:
-----------
ENH: Changes (and tests) to allow exporting half-floats through the buffer interface. (#1789)

Code:
Added NPY_HALF to switch (descr->type_num) in _buffer_format_string.
Added 'e' keys to the _pep3118_native_map and _pep3118_standard_map.

Tests:
Added entries to the generic round-trip tests.
Added specialized half-float test that round-trips example values from the wikipedia page.

http://en.wikipedia.org/wiki/Half_precision_floating-point_format
http://mail.scipy.org/pipermail/numpy-discussion/2011-March/055795.html





More information about the Numpy-svn mailing list