Re: [Numpy-discussion] bug in PyArray_GetCastFunc

2011-12-04 Thread Charles R Harris
On Sun, Dec 4, 2011 at 6:30 PM, Geoffrey Irving wrote: > On Sun, Dec 4, 2011 at 10:02 AM, Charles R Harris > wrote: > > > > > > On Sat, Dec 3, 2011 at 5:28 PM, Geoffrey Irving wrote: > >> > >> When attempting to cast to a user defined type, PyArray_GetCast looks > >> up the cast function in the

Re: [Numpy-discussion] bug in PyArray_GetCastFunc

2011-12-04 Thread Geoffrey Irving
On Sun, Dec 4, 2011 at 10:02 AM, Charles R Harris wrote: > > > On Sat, Dec 3, 2011 at 5:28 PM, Geoffrey Irving wrote: >> >> When attempting to cast to a user defined type, PyArray_GetCast looks >> up the cast function in the dictionary but doesn't check if the entry >> exists.  This causes segfau

Re: [Numpy-discussion] bug in PyArray_GetCastFunc

2011-12-04 Thread Charles R Harris
On Sat, Dec 3, 2011 at 5:28 PM, Geoffrey Irving wrote: > When attempting to cast to a user defined type, PyArray_GetCast looks > up the cast function in the dictionary but doesn't check if the entry > exists. This causes segfaults. Here's a patch. > > Geoffrey > > diff --git a/numpy/core/src/mu

[Numpy-discussion] bug in PyArray_GetCastFunc

2011-12-03 Thread Geoffrey Irving
When attempting to cast to a user defined type, PyArray_GetCast looks up the cast function in the dictionary but doesn't check if the entry exists. This causes segfaults. Here's a patch. Geoffrey diff --git a/numpy/core/src/multiarray/convert_datatype.c b/numpy/core/src/multiarray/convert_datat