[Numpy-discussion] 1.6.0b1 half float buffer bug?

Mark Wiebe mwwiebe@gmail....
Thu Mar 31 12:06:52 CDT 2011

On Wed, Mar 30, 2011 at 4:42 PM, Eli Stevens (Gmail)

> On Fri, Mar 25, 2011 at 10:00 AM, Eli Stevens (Gmail)
> <wickedgrey@gmail.com> wrote:
> > Can anyone please give me some suggestions on how to go about writing
> > a unit test for this?  Or should I just submit a pull request?
> I've gotten a bit of positive feedback to adding the 'e' type to the
> struct module on the python-ideas list (per my understanding, not
> before python 3.3, but I don't think that should hinder adoption in
> other libraries), so I'd like to ask again about unit testing a change
> like this.  Can anyone offer some advice for where to start?

The tests for the buffer protocol are in
numpy/core/tests/test_multiarray.py, starting at line 1847. It does some
round-trip testing of all the types through the memoryview object.

You'll also need to change the _dtype_from_pep3118 in
numpy/core/_internal.py, called from the _descriptor_from_pep3118_format
function, so that NumPy can accept the half type from a buffer as well.

Also, what kind of timeframe / cutoff am I looking at to get this into
> 1.6.0 or 1.6.x?

Since the changes to NumPy are pretty small, I think it should be ok to get
into 1.6.0. How to handle it is up to Ralf, however, and it would probably
be best to get it into beta 2 which I believe he would like to release over
the weekend (please chime in to correct me).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110331/53332c84/attachment.html 

More information about the NumPy-Discussion mailing list