Re: [Cython] Cython mishandles None in slices

2013-04-12 Thread Stefan Behnel
Bryan O'Sullivan, 13.04.2013 05:02: > Here are two lines of valid Python: > > >>> 'abc'[None:2] > 'ab' > >>> 'abc'[1:None] > 'bc' > > If I try this in code that I compile with Cython, it throws an exception: > > TypeError: 'NoneType' object cannot be interpreted as an index Have you tried it wi

[Cython] Cython mishandles None in slices

2013-04-12 Thread Bryan O'Sullivan
Here are two lines of valid Python: >>> 'abc'[None:2] 'ab' >>> 'abc'[1:None] 'bc' If I try this in code that I compile with Cython, it throws an exception: TypeError: 'NoneType' object cannot be interpreted as an index ___ cython-devel mailing list cyt

Re: [Cython] [PATCH] Refcount error when transposing memoryview attribute of an extension class

2013-04-12 Thread Stefan Behnel
mark florisson, 12.04.2013 18:37: > Stefan, do you want to wait with 0.19 for the strides fix? We don't know > when 0.20 would be, I'd like to give it a go this weekend. No problem, I can wait. Let's plan the RC for early next week, if you can get a fix ready by then. Stefan

Re: [Cython] [PATCH] Refcount error when transposing memoryview attribute of an extension class

2013-04-12 Thread mark florisson
On 12 April 2013 13:20, Matěj Laitl wrote: > On 8. 4. 2013 Matěj Laitl wrote: > > Hi cython-devel and Mark, > > I was getting > > > > > Fatal Python error: Acquisition count is 0 (line XYZ) > > > > when I was doing > > > > > cdef class MemViewContainer: > > > cdef double[:, :] A > > > > > >

[Cython] Generated C++ code incompatible with Clang

2013-04-12 Thread Hannes Röst
Dear mailing list In the process of developing a rather large Cython project where we wrap the scientific OpenMS library (http://sourceforge.net/projects/open-ms/) using Cython, we have come across an issue with the C++ code that is generated by Cython. The issue is that Cython generates C++ that

Re: [Cython] [PATCH] Refcount error when transposing memoryview attribute of an extension class

2013-04-12 Thread Matěj Laitl
On 8. 4. 2013 Matěj Laitl wrote: > Hi cython-devel and Mark, > I was getting > > > Fatal Python error: Acquisition count is 0 (line XYZ) > > when I was doing > > > cdef class MemViewContainer: > > cdef double[:, :] A > > > > cdef a_method(self): > > self.A = np.eye(2) > >

[Cython] Cython 0.19 beta 2 released

2013-04-12 Thread Stefan Behnel
Hi, I uploaded a second (and hopefully last) beta release for Cython 0.19. Please give it a try with your code. http://cython.org/release/Cython-0.19b2.tar.gz http://cython.org/release/Cython-0.19b2.zip Cython 0.19 features many enhancements and changes regarding performance, usability and Pyt

Re: [Cython] Bug(?): chained assignments and tuple unpacking

2013-04-12 Thread Stefan Behnel
Alok Singhal, 10.04.2013 22:36: > The following code (also attached as a .pyx file) fails in the current > Cython : > > cdef class test: > pass > > def main(): > cdef test a, b, c, d > (a, b) = (c, d) = (None, None) > > When run, I get the following traceback: > > In [1]: import ass