Re: [Cython] Safer default exception handling with return type annotations?

2017-09-07 Thread Robert Bradshaw
On Wed, Sep 6, 2017 at 12:06 AM, Stefan Behnel wrote: > Robert Bradshaw schrieb am 06.09.2017 um 08:28: >> On Tue, Sep 5, 2017 at 10:44 PM, Stefan Behnel wrote: >>> Robert Bradshaw schrieb am 06.09.2017 um 07:21: I'm not a huge fan of behaving differently depending on what syntax was use

Re: [Cython] Error handling during buffer reassignment

2017-09-07 Thread Robert Bradshaw
On Wed, Sep 6, 2017 at 3:53 AM, Stefan Behnel wrote: > Hi, > > consider this code: > > cdef np.ndarray[int32, ndim=1] a > a = new_int32_buffer() > a = new_float32_buffer() > > This fails during the second assignment, but only during validation, after > unpacking the buffer. The code th