Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-08 Thread Dave Hirschfeld
Dag Sverre Seljebotn writes: > > cdef np.ndarray[double, mode='fortran'] arr > > that relies on PEP 3118 contiguous-flags and I did no checking myself. > Lots of Cython code does this instead of memoryviews (I still write my > own code that way). > > The memory views OTOH does their own chec

Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-08 Thread Nathaniel Smith
On Mon, Apr 8, 2013 at 7:42 AM, Dag Sverre Seljebotn wrote: > I guess you have changed your implementation of PEP 3118 too slightly on the > NumPy side? Is this undefined in the PEP or are you now not in strict > adherence to it? I just checked, and PEP 3118 just says that if a {C,F,ANY}_CONTIG

Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-08 Thread Sebastian Berg
On Mon, 2013-04-08 at 12:31 +0200, Dag Sverre Seljebotn wrote: > On 04/08/2013 09:59 AM, Sebastian Berg wrote: > > On Mon, 2013-04-08 at 08:42 +0200, Dag Sverre Seljebotn wrote: > >> On 04/06/2013 04:19 PM, Nathaniel Smith wrote: > >>> Hi all, > >>> > >>> If you build current numpy master with > >>

Re: [Cython] Constant pointers not working

2013-04-08 Thread Stefan Behnel
Volker Mische, 08.04.2013 13:43: > On 04/02/2013 07:20 PM, Volker Mische wrote: >> On 03/22/2013 02:47 PM, Volker Mische wrote: >>> Hi all, >>> >>> I was excited to see that 'const' is finally supported, but constant >>> pointers are not. Here's an example with the corresponding error: >>> >>> Erro

Re: [Cython] Constant pointers not working

2013-04-08 Thread Volker Mische
On 04/02/2013 07:20 PM, Volker Mische wrote: > On 03/22/2013 02:47 PM, Volker Mische wrote: >> Hi all, >> >> I was excited to see that 'const' is finally supported, but constant >> pointers are not. Here's an example with the corresponding error: >> >> Error compiling Cython file: >> --

Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-08 Thread Dag Sverre Seljebotn
On 04/08/2013 09:59 AM, Sebastian Berg wrote: On Mon, 2013-04-08 at 08:42 +0200, Dag Sverre Seljebotn wrote: On 04/06/2013 04:19 PM, Nathaniel Smith wrote: Hi all, If you build current numpy master with NPY_RELAXED_STRIDES_CHECKING=1 python setup.py install then Cython code using ndarrays

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

2013-04-08 Thread Matěj Laitl
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) > some_function(self.A.T) > some_function(self.A.T

Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-08 Thread Sebastian Berg
On Mon, 2013-04-08 at 08:42 +0200, Dag Sverre Seljebotn wrote: > On 04/06/2013 04:19 PM, Nathaniel Smith wrote: > > Hi all, > > > > If you build current numpy master with > >NPY_RELAXED_STRIDES_CHECKING=1 python setup.py install > > then Cython code using ndarrays starts blowing up, e.g.: > > >

Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-08 Thread Dag Sverre Seljebotn
On 04/06/2013 04:19 PM, Nathaniel Smith wrote: Hi all, If you build current numpy master with NPY_RELAXED_STRIDES_CHECKING=1 python setup.py install then Cython code using ndarrays starts blowing up, e.g.: # foo.pyx def add_one(array): cdef double[::1] a = array a[0] += 1. ret