A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-December/084196.html below:

[Python-Dev] Allocation of shape and strides fields in Py_buffer

[Python-Dev] Allocation of shape and strides fields in Py_buffer [Python-Dev] Allocation of shape and strides fields in Py_bufferNick Coghlan ncoghlan at gmail.com
Wed Dec 10 12:54:01 CET 2008
Greg Ewing wrote:
> In any case, I think it should be possible to implement
> either version without the memoryview having to own
> more than one Py_buffer and one set of shape/strides
> at a time. Slicing the memoryview creates another
> memoryview with its own Py_buffer and shape/strides.

The important point is that the shape information in the Py_buffer
filled in by the underlying object is the shape of *that* object.

Except in the trivial case where the memoryview is exposing the entire
underlying data buffer, the shape information in the Py_buffer has
nothing to do with the shape of the memoryview object itself.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4