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

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


Branch: refs/heads/master
Home:   https://github.com/numpy/numpy

Commit: f9c7bde68655de06546f5c8dba30314888e409cc
    https://github.com/numpy/numpy/commit/f9c7bde68655de06546f5c8dba30314888e409cc
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