[Cython] Error handling during buffer reassignment

2017-09-06 Thread Stefan Behnel
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 that handles this case is generated here: https://github.com/cython/cyth

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

2017-09-06 Thread Stefan Behnel
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 used to annotate the return type--I'd rather they be 100% aliase