BUG: fix half/float16 array interface bug #234

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
return NULL;
}
- descr = PyArray_DescrFromType(type_num);
- if (descr == NULL) {
+ PyArray_Descr *descr = NULL;
@charris

charris Mar 20, 2012

Owner

Can't declare variable here, it isn't portable C.

+ def test_half_array_interface(self):
+ """Test that half is compatible with __array_interface__"""
+ a = np.empty((1), dtype=float16)
+ class Dummy: pass
@charris

charris Mar 20, 2012

Owner

It would read better if the Dummy class was defined at the beginning and separated from the following code with a blank line.

Owner

charris commented Mar 20, 2012

Looks good to me on first read through. I like that a lot of code goes missing ;) Needs a few small code cleanups to make it portable C.

Owner

charris commented Mar 31, 2012

Fixed up and pushed in dbf2351..d959ab9, thanks.

@charris charris closed this Mar 31, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment