[Python-Dev] Hashable memoryviews

Nick Coghlan ncoghlan at gmail.com
Sun Nov 13 12:01:41 CET 2011


On Sun, Nov 13, 2011 at 8:49 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> I don't understand this feature. How do you represent a reversed buffer
> using the buffer API, and how do you ensure that consumers (especially
> those written in C) see the buffer reversed?

The values in the strides array are signed, so presumably just by
specifying a "-1" for the relevant dimension (triggering all the usual
failures if you encounter a buffer API consumer that can only handle C
contiguous arrays).

Cheers,
Nick.

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


More information about the Python-Dev mailing list