On Wed, Mar 30, 2011 at 4:42 PM, Eli Stevens (Gmail) <[email protected]>wrote:
> On Fri, Mar 25, 2011 at 10:00 AM, Eli Stevens (Gmail) > <[email protected]> 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). -Mark
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
