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/084209.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_bufferTravis Oliphant oliphant.travis at ieee.org
Wed Dec 10 17:39:45 CET 2008
Greg Ewing wrote:
> Nick Coghlan wrote:
>> Maintaining a PyDict instance to map from view pointers to shapes
>> and strides info doesn't strike me as a "complex scheme" though.
> 
> I don't see why a given buffer provider should ever need
> more than one set of shape/strides arrays at a time. It
> can allocate them on creation, reallocate them as needed
> if the shape of its internal data changes, and deallocate
> them when it goes away.
> 

I agree.  NumPy has a single shape/strides array.  The intent was to 
share this through the buffer interface.


> If you are creating view objects that present slices or
> some other alternative perspective, then the view object
> itself is a buffer provider and should maintain shape/stride
> arrays for its particular view of the underlying object.

Yes, that is correct.

-Travis

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