[Python-3000] Using memoryviews

Nick Coghlan ncoghlan at gmail.com
Sun Nov 23 12:37:16 CET 2008


Josiah Carlson wrote:
> On Sat, Nov 22, 2008 at 4:18 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> The big, big limitation of memoryviews right now is that they only support
>> one-dimensional byte buffers. The people interested in more complex arrangements
>> (that is, Scipy/Numpy people) have been completely absent from the python-dev
>> community for many months now, and I don't think anyone else cares enough to do
>> the job instead of them.
> 
> That's unfortunate, as they were the major pushers for memoryview as
> it stands today.

I believe the Scipy/Numpy folks mainly needed the underlying protocol
for describing and sharing chunks of memory (e.g. when mixing the use of
PIL and NumPy in a single program). The memoryview Python object just
provides a basic mechanism to access that protocol from pure Python
code. At this point in time, I would expect significant uses of the
protocol to be largely mediated by extension modules (either existing
ones or new ones) rather than via pure Python code.

I see it as similar to the way extended slicing was originally
introduced without significant support in the builtin types, but still
immediately solved a problem for the NumPy folks due to the existence of
the new protocol.

Cheers,
Nick.


-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-3000 mailing list