[Cython] Upcoming cython/numpy breakage with stride checking
Dave Hirschfeld
dave.hirschfeld at gmail.com
Tue Apr 9 03:04:14 CEST 2013
Dag Sverre Seljebotn <d.s.seljebotn at ...> 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 checking, but I also see plenty of
> references to PyBUF_C_CONTIGUOUS etc. inside
> Cython/Utility/MemoryView.pyx, so perhaps it does both. Mark would have
> the definitive answer here.
>
> Dag Sverre
>
Is it the case that MemoryViews are doing some redundant checking?
If so, is that the cause of the order of mangnitude performance difference
between the MemoryView and ndarray syntax that I observed in the following
thread?
http://thread.gmane.org/gmane.comp.python.cython.devel/14626
Sorry for hijacking the thread, but it would be fantastic if the performance
issues could be addressed at the same time if they are indeed linked
Thanks,
Dave
More information about the cython-devel
mailing list