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

2013-04-09 Thread mark florisson
On 9 April 2013 13:09, mark florisson wrote: > > > > On 8 April 2013 13:04, Sebastian Berg wrote: > >> 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: >> > >> O

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

2013-04-09 Thread mark florisson
On 8 April 2013 13:04, Sebastian Berg wrote: > 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

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

2013-04-09 Thread mark florisson
On 9 April 2013 02:04, Dave Hirschfeld wrote: > 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 cod

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] 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

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