Re: [Cython] Error handling during buffer reassignment

2017-09-09 Thread Stefan Behnel
Robert Bradshaw schrieb am 08.09.2017 um 06:36: > On Wed, Sep 6, 2017 at 3:53 AM, Stefan Behnel wrote: >> 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 valid

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

[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