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 irv...@naml.us 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

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 charlesr.har...@gmail.com wrote: On Sat, Dec 3, 2011 at 5:28 PM, Geoffrey Irving irv...@naml.us 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

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 irv...@naml.us wrote: On Sun, Dec 4, 2011 at 10:02 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, Dec 3, 2011 at 5:28 PM, Geoffrey Irving irv...@naml.us wrote: When attempting to cast to a user defined type,

[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