On Thu, 12 May 2016 23:14:36 +0000 (UTC) Sturla Molden <sturla.mol...@gmail.com> wrote: > Antoine Pitrou <solip...@pitrou.net> wrote: > > > Can you define "expensive"? > > Slow enough to cause complaints on the Cython mailing list.
What kind of complaints? Please be specific. > > Buffer acquisition itself only calls a single C callback and uses a > > stack-allocated C structure. It shouldn't be "expensive". > > I don't know the reason, only that buffer acquisition from NumPy arrays > with typed memoryviews Again, what have memoryviews to do with it? "Acquiring a buffer" is just asking the buffer provider (the Numpy array) to fill a Py_buffer structure's contents. That has nothing to do with memoryviews. When writing C code to interact with buffer-providing objects, you usually don't bother with memoryviews at all. You just use a Py_buffer structure. Regards Antoine. _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion